Java 类org.apache.lucene.search.DocTermOrdsRewriteMethod 实例源码

项目:search    文件:FieldType.java   
/**
 * Expert: Returns the rewrite method for multiterm queries such as wildcards.
 * @param parser The {@link org.apache.solr.search.QParser} calling the method
 * @param field The {@link org.apache.solr.schema.SchemaField} of the field to search
 * @return A suitable rewrite method for rewriting multi-term queries to primitive queries.
 */
public MultiTermQuery.RewriteMethod getRewriteMethod(QParser parser, SchemaField field) {
  if (!field.indexed() && field.hasDocValues()) {
    return field.multiValued() ? new DocTermOrdsRewriteMethod() : new FieldCacheRewriteMethod();
  } else {
    return MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT;
  }
}
项目:NYBC    文件:FieldType.java   
/**
 * Expert: Returns the rewrite method for multiterm queries such as wildcards.
 * @param parser The {@link org.apache.solr.search.QParser} calling the method
 * @param field The {@link org.apache.solr.schema.SchemaField} of the field to search
 * @return A suitable rewrite method for rewriting multi-term queries to primitive queries.
 */
public MultiTermQuery.RewriteMethod getRewriteMethod(QParser parser, SchemaField field) {
  if (!field.indexed() && field.hasDocValues()) {
    return field.multiValued() ? new DocTermOrdsRewriteMethod() : new FieldCacheRewriteMethod();
  } else {
    return MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT;
  }
}
项目:search-core    文件:FieldType.java   
/**
 * Expert: Returns the rewrite method for multiterm queries such as wildcards.
 * @param parser The {@link org.apache.solr.search.QParser} calling the method
 * @param field The {@link org.apache.solr.schema.SchemaField} of the field to search
 * @return A suitable rewrite method for rewriting multi-term queries to primitive queries.
 */
public MultiTermQuery.RewriteMethod getRewriteMethod(QParser parser, SchemaField field) {
  if (!field.indexed() && field.hasDocValues()) {
    return field.multiValued() ? new DocTermOrdsRewriteMethod() : new FieldCacheRewriteMethod();
  } else {
    return MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT;
  }
}
项目:read-open-source-code    文件:FieldType.java   
/**
 * Expert: Returns the rewrite method for multiterm queries such as wildcards.
 * @param parser The {@link org.apache.solr.search.QParser} calling the method
 * @param field The {@link org.apache.solr.schema.SchemaField} of the field to search
 * @return A suitable rewrite method for rewriting multi-term queries to primitive queries.
 */
public MultiTermQuery.RewriteMethod getRewriteMethod(QParser parser, SchemaField field) {
  if (!field.indexed() && field.hasDocValues()) {
    return field.multiValued() ? new DocTermOrdsRewriteMethod() : new FieldCacheRewriteMethod();
  } else {
    return MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT;
  }
}
项目:read-open-source-code    文件:FieldType.java   
/**
 * Expert: Returns the rewrite method for multiterm queries such as wildcards.
 * @param parser The {@link org.apache.solr.search.QParser} calling the method
 * @param field The {@link org.apache.solr.schema.SchemaField} of the field to search
 * @return A suitable rewrite method for rewriting multi-term queries to primitive queries.
 */
public MultiTermQuery.RewriteMethod getRewriteMethod(QParser parser, SchemaField field) {
  if (!field.indexed() && field.hasDocValues()) {
    return field.multiValued() ? new DocTermOrdsRewriteMethod() : new FieldCacheRewriteMethod();
  } else {
    return MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT;
  }
}