Example usage for org.apache.solr.schema FieldType getRewriteMethod

List of usage examples for org.apache.solr.schema FieldType getRewriteMethod

Introduction

In this page you can find the example usage for org.apache.solr.schema FieldType getRewriteMethod.

Prototype

public MultiTermQuery.RewriteMethod getRewriteMethod(QParser parser, SchemaField field) 

Source Link

Document

Expert: Returns the rewrite method for multiterm queries such as wildcards.

Usage

From source file:org.tallison.solr.search.SolrSpanQueryParser.java

License:Apache License

/**
 * @param fieldName field name/*from w  ww.ja va  2  s .  co m*/
 * @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);
}