本文整理汇总了Java中org.apache.lucene.search.vectorhighlight.FragListBuilder类的典型用法代码示例。如果您正苦于以下问题:Java FragListBuilder类的具体用法?Java FragListBuilder怎么用?Java FragListBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FragListBuilder类属于org.apache.lucene.search.vectorhighlight包,在下文中一共展示了FragListBuilder类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getFragListBuilder
import org.apache.lucene.search.vectorhighlight.FragListBuilder; //导入依赖的package包/类
@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();
}
示例2: getFragListBuilder
import org.apache.lucene.search.vectorhighlight.FragListBuilder; //导入依赖的package包/类
@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();
}
示例3: getFragListBuilder
import org.apache.lucene.search.vectorhighlight.FragListBuilder; //导入依赖的package包/类
@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();
}
示例4: getFragListBuilder
import org.apache.lucene.search.vectorhighlight.FragListBuilder; //导入依赖的package包/类
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);
}
示例5: getHighlighter
import org.apache.lucene.search.vectorhighlight.FragListBuilder; //导入依赖的package包/类
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
}
示例6: getFragListBuilder
import org.apache.lucene.search.vectorhighlight.FragListBuilder; //导入依赖的package包/类
/**
* Return a FragListBuilder.
*
* @param params The params controlling Highlighting
* @return An appropriate FragListBuilder.
*/
public FragListBuilder getFragListBuilder( SolrParams params );