本文整理汇总了Java中org.apache.lucene.search.MultiTermQuery.RewriteMethod类的典型用法代码示例。如果您正苦于以下问题:Java RewriteMethod类的具体用法?Java RewriteMethod怎么用?Java RewriteMethod使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RewriteMethod类属于org.apache.lucene.search.MultiTermQuery包,在下文中一共展示了RewriteMethod类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getMultiTermRewriteMethod
import org.apache.lucene.search.MultiTermQuery.RewriteMethod; //导入依赖的package包/类
/**
* @param fieldName field name
* @return RewriteMethod for a given field
*/
@Override
public RewriteMethod getMultiTermRewriteMethod(String fieldName) {
SchemaField field = schema.getFieldOrNull(fieldName);
if (field == null) {
return getMultiTermRewriteMethod();
}
FieldType type = field.getType();
return type.getRewriteMethod(nonTextParser, field);
}
示例2: getMultiTermRewriteMethod
import org.apache.lucene.search.MultiTermQuery.RewriteMethod; //导入依赖的package包/类
/**
* Currently returns multiTermRewriteMethod no matter the field.
* This allows for hooks for overriding to handle
* field-specific MultiTermRewriteMethod handling
*
* @param field field to use
* @return RewriteMethod for a given field
*/
protected RewriteMethod getMultiTermRewriteMethod(String field) {
return multiTermRewriteMethod;
}
示例3: setMultiTermRewriteMethod
import org.apache.lucene.search.MultiTermQuery.RewriteMethod; //导入依赖的package包/类
/**
* This currently sets the method for all fields.
* @param method rewrite method
*/
public void setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method) {
this.multiTermRewriteMethod = method;
}