Example usage for org.apache.lucene.queries.function.valuesource EnumFieldSource EnumFieldSource

List of usage examples for org.apache.lucene.queries.function.valuesource EnumFieldSource EnumFieldSource

Introduction

In this page you can find the example usage for org.apache.lucene.queries.function.valuesource EnumFieldSource EnumFieldSource.

Prototype

public EnumFieldSource(String field, Map<Integer, String> enumIntToStringMap,
            Map<String, Integer> enumStringToIntMap) 

Source Link

Usage

From source file:org.apache.solr.schema.AbstractEnumField.java

License:Apache License

@Override
public ValueSource getValueSource(SchemaField field, QParser qparser) {
    field.checkFieldCacheSource();/*from   www  .  ja v a 2  s  . co  m*/
    return new EnumFieldSource(field.getName(), enumMapping.enumIntToStringMap, enumMapping.enumStringToIntMap);
}