@Override public FragListBuilder getFragListBuilder(SolrParams params) { // NOTE: This class (currently) makes no use of params // If that ever changes, it should wrap them with defaults... // params = SolrParams.wrapDefaults(params, defaults) numRequests++; return new org.apache.lucene.search.vectorhighlight.SingleFragListBuilder(); }
@Override public FragListBuilder getFragListBuilder(SolrParams params) { // NOTE: This class (currently) makes no use of params // If that ever changes, it should wrap them with defaults... // params = SolrParams.wrapDefaults(params, defaults) numRequests++; return new org.apache.lucene.search.vectorhighlight.WeightedFragListBuilder(); }
@Override public FragListBuilder getFragListBuilder(SolrParams params) { // NOTE: This class (currently) makes no use of params // If that ever changes, it should wrap them with defaults... // params = SolrParams.wrapDefaults(params, defaults) numRequests++; return new org.apache.lucene.search.vectorhighlight.SimpleFragListBuilder(); }
protected FragListBuilder getFragListBuilder(String fieldName, SolrParams params) { String flb = params.getFieldParam(fieldName, HighlightParams.FRAG_LIST_BUILDER); SolrFragListBuilder solrFlb = fragListBuilders.get(flb); if (solrFlb == null) { throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "Unknown fragListBuilder: " + flb); } return solrFlb.getFragListBuilder(params); }
static FastVectorHighlighter getHighlighter() { FragListBuilder fragListBuilder = new SimpleFragListBuilder(); // #F FragmentsBuilder fragmentBuilder = // #F new ScoreOrderFragmentsBuilder( // #F BaseFragmentsBuilder.COLORED_PRE_TAGS, // #F BaseFragmentsBuilder.COLORED_POST_TAGS); // #F return new FastVectorHighlighter(true, true, // #F fragListBuilder, fragmentBuilder); // #F }
/** * Return a FragListBuilder. * * @param params The params controlling Highlighting * @return An appropriate FragListBuilder. */ public FragListBuilder getFragListBuilder( SolrParams params );