Java 类org.apache.lucene.search.MultiTermQuery.RewriteMethod 实例源码

项目:lucene-addons    文件:SolrSpanQueryParser.java   
/**
 * @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);
}
项目:lucene-addons    文件:SpanQueryParserBase.java   
/**
 * 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;
}
项目:lucene-addons    文件:SpanQueryParserBase.java   
/**
 *
 * @return default multitermrewritemethod
 */
protected RewriteMethod getMultiTermRewriteMethod() { return multiTermRewriteMethod;}
项目:lucene-addons    文件:SpanQueryParserBase.java   
/**
 * This currently sets the method for all fields.
 * @param method rewrite method
 */
public void setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method) {
  this.multiTermRewriteMethod = method;
}