Package org.apache.lucene.search.vectorhighlight

Examples of org.apache.lucene.search.vectorhighlight.SimpleFragListBuilder


  public final String highlight(final Query parsedQuery, final IndexReader reader, final int docId,
      final String fieldName) {
    UseCase uc = MonitorFactory.startUseCase("Highlight.WhitespaceVectorBolder.highlight()");
    StringBuilder result = new StringBuilder();
    if (fieldName != null && parsedQuery != null) {
      FastVectorHighlighter highlighter = new FastVectorHighlighter(true, true, new SimpleFragListBuilder(),
          new WhitespaceFragmentsBuilder(new String[] { getHighlightPrefix() },
              new String[] { getHighlightPostfix() }));
      FieldQuery fieldQuery = highlighter.getFieldQuery(parsedQuery);
      //highlighter.setTextFragmenter(new WordCountFragmenter(fragmentSize));
View Full Code Here


  public final String highlight(final Query parsedQuery, final IndexReader reader, final int docId,
      final String fieldName) {
    UseCase uc = MonitorFactory.startUseCase("Highlight.VectorBolder.highlight()");
    String result = "";
    if (fieldName != null && parsedQuery != null) {
      FastVectorHighlighter highlighter = new FastVectorHighlighter(true, true, new SimpleFragListBuilder(),
          new ScoreOrderFragmentsBuilder(new String[] { getHighlightPrefix() },
              new String[] { getHighlightPostfix() }));
      FieldQuery fieldQuery = highlighter.getFieldQuery(parsedQuery);
      //highlighter.setTextFragmenter(new WordCountFragmenter(fragmentSize));
View Full Code Here

TOP

Related Classes of org.apache.lucene.search.vectorhighlight.SimpleFragListBuilder

Copyright © 2018 www.massapicom. 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.