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

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


    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


  }

  public void testWhitespaceVectorBolder() throws Exception {
    System.out.println("WHITESPACEVECTOR");
    WhitespaceVectorBolder h = new WhitespaceVectorBolder(new GenericConfiguration());
    String ret = h.highlight(query, searcher.getIndexReader(), 0, "binarycontent");
    System.out.println(ret);

    assertTrue(ret != null && !"".equals(ret));
  }
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.