Package com.gentics.cr.lucene.search.highlight

Examples of com.gentics.cr.lucene.search.highlight.AdvancedContentHighlighter.highlight()


          String ret = null;
          if (highligther instanceof AdvancedContentHighlighter) {
            AdvancedContentHighlighter advancedHighlighter = (AdvancedContentHighlighter) highligther;
            int documentId = Integer.parseInt(doc.get("id"));

            ret = advancedHighlighter.highlight(parsedQuery, reader, documentId, att);

          } else {
            ret = highligther.highlight((String) crBean.get(att), parsedQuery);
          }
          if (ret != null && !"".equals(ret)) {
View Full Code Here


    AdvancedContentHighlighter advancedHighlighter = new WhitespaceVectorBolder(hConfig);
    int documentId = 0;
    Query pQuery = parser.parse("word1");
    IndexReader reader = lucene.getReader();
    Query rQuery = pQuery.rewrite(reader);
    String highlighted = advancedHighlighter.highlight(rQuery, reader, documentId, "content");
   }
 
  public void testBoostingWithCRRecencyBoostingQueryParser() throws ParseException, CorruptIndexException, IOException {
    Query orginalQuery = parser.parse("word1");
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.