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

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


            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)) {
            crBean.set(att, ret);
          }
        }
View Full Code Here


  public void testPhraseBolder2() throws Exception {
    System.out.println("PHRASE2");
    ContentHighlighter h = new PhraseBolder(new GenericConfiguration());
    CRResolvableBean crBean = new CRResolvableBean();
    crBean.set("binarycontent", "this is a test (AHSt)");
    String ret = h.highlight((String) crBean.get("binarycontent"), query);
    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.