/** * Return a {@link org.apache.lucene.search.highlight.Scorer} suitable for this Query and field. * * @param query * The current query * @param fieldName * The name of the field * @param request * The SolrQueryRequest */ private Scorer getQueryScorer(Query query, String requestFieldname, String schemaFieldName, SolrQueryRequest request) { boolean reqFieldMatch = request.getParams().getFieldBool(requestFieldname, HighlightParams.FIELD_MATCH, false); if (reqFieldMatch) { return new QueryTermScorer(query, request.getSearcher().getIndexReader(), schemaFieldName); } else { return new QueryTermScorer(query); } }
public LumongoHighlighter(Formatter formatter, Scorer fragmentScorer, Lumongo.HighlightRequest highlightRequest) { super(formatter, fragmentScorer); this.highlightRequest = highlightRequest; }