List of usage examples for org.apache.lucene.queries.function.valuesource MultiValuedIntFieldSource MultiValuedIntFieldSource
public MultiValuedIntFieldSource(String field, Type selector)
From source file:org.apache.solr.schema.EnumFieldType.java
License:Apache License
@Override public final ValueSource getSingleValueSource(MultiValueSelector choice, SchemaField field, QParser parser) { if (!field.multiValued()) { // trivial base case return getValueSource(field, parser); // single value matches any selector }//from w w w. jav a 2 s . c o m SortedNumericSelector.Type selectorType = choice.getSortedNumericSelectorType(); if (null == selectorType) { throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, choice.toString() + " is not a supported option for picking a single value" + " from the multivalued field: " + field.getName() + " (type: " + this.getTypeName() + ")"); } return new MultiValuedIntFieldSource(field.getName(), selectorType); }