Examples of doHighlighting()


Examples of org.apache.solr.highlight.SolrHighlighter.doHighlighting()

      // TODO: docIds will be null when running distributed search.
      // See comment in ClusteringComponent#finishStage().
      if (produceSummary && docIds != null) {
        docsHolder[0] = docIds.get(sdoc).intValue();
        DocList docAsList = new DocSlice(0, 1, docsHolder, scores, 1, 1.0f);
        NamedList<Object> highlights = highlighter.doHighlighting(docAsList, theQuery, req, snippetFieldAry);
        if (highlights != null && highlights.size() == 1) {//should only be one value given our setup
          //should only be one document with one field
          @SuppressWarnings("unchecked")
          NamedList<String []> tmp = (NamedList<String[]>) highlights.getVal(0);
          String [] highlt = tmp.get(snippetField);
View Full Code Here

Examples of org.apache.solr.highlight.SolrHighlighter.doHighlighting()

        }
      }
     
      // No highlighting if there is no query -- consider q.alt="*:*
      if( highlightQuery != null ) {
        NamedList sumData = highlighter.doHighlighting(
                rb.getResults().docList,
                highlightQuery.rewrite(req.getSearcher().getReader()),
                req, defaultHighlightFields );
       
        if(sumData != null) {
View Full Code Here

Examples of org.apache.solr.highlight.SolrHighlighter.doHighlighting()

        highlightQuery = rewrite ?  highlightQuery.rewrite(req.getSearcher().getReader()) : highlightQuery;
      }
     
      // No highlighting if there is no query -- consider q.alt="*:*
      if( highlightQuery != null ) {
        NamedList sumData = highlighter.doHighlighting(
                rb.getResults().docList,
                highlightQuery,
                req, defaultHighlightFields );
       
        if(sumData != null) {
View Full Code Here

Examples of org.apache.solr.highlight.SolrHighlighter.doHighlighting()

              fieldSelector);
      String snippet = getValue(doc, snippetField);
      if (produceSummary == true) {
        docsHolder[0] = id.intValue();
        DocList docAsList = new DocSlice(0, 1, docsHolder, scores, 1, 1.0f);
        highligher.doHighlighting(docAsList, theQuery, req, snippetFieldAry);
      }
      Document carrotDocument = new Document(getValue(doc, titleField),
              snippet, doc.get(urlField));
      carrotDocument.addField("solrId", doc.get(idFieldName));
      result.add(carrotDocument);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.