public final class SchemaField extends FieldProperties
BINARY, DOC_VALUES, INDEXED, LARGE_FIELD, MULTIVALUED, OMIT_NORMS, OMIT_POSITIONS, OMIT_TF_POSITIONS, REQUIRED, SORT_MISSING_FIRST, SORT_MISSING_LAST, STORE_OFFSETS, STORE_TERMOFFSETS, STORE_TERMPAYLOADS, STORE_TERMPOSITIONS, STORE_TERMVECTORS, STORED, TOKENIZED, USE_DOCVALUES_AS_STORED
Constructor and Description |
---|
SchemaField(SchemaField prototype,
String name)
Create a new SchemaField from an existing one by using all
of the properties of the prototype except the field name.
|
SchemaField(String name,
FieldType type)
Create a new SchemaField with the given name and type,
using all the default properties from the type.
|
SchemaField(String name,
FieldType type,
int properties,
String defaultValue)
Create a new SchemaField with the given name and type,
and with the specified properties.
|
Modifier and Type | Method and Description |
---|---|
void |
checkFieldCacheSource()
Sanity checks that the properties of this field type are plausible
for a field that may be used to get a FieldCacheSource, throwing
an appropriate exception (including the field name) if it is not.
|
void |
checkSortability()
Sanity checks that the properties of this field type are plausible
for a field that may be used in sorting, throwing an appropriate
exception (including the field name) if it is not.
|
IndexableField |
createField(Object val,
float boost) |
List<IndexableField> |
createFields(Object val,
float boost) |
boolean |
equals(Object obj) |
Map<String,?> |
getArgs() |
String |
getDefaultValue() |
String |
getName() |
SimpleOrderedMap<Object> |
getNamedPropertyValues(boolean showDefaults)
Get a map of property name -> value for this field.
|
int |
getProperties() |
SortField |
getSortField(boolean top)
Delegates to the FieldType for this field
|
FieldType |
getType() |
boolean |
hasDocValues() |
int |
hashCode() |
boolean |
indexed() |
boolean |
isLarge() |
boolean |
isPolyField()
If true, then use
createFields(Object, float) , else use createField(java.lang.Object, float) to save an extra allocation |
boolean |
isRequired() |
boolean |
multiValued() |
boolean |
omitNorms() |
boolean |
omitPositions() |
boolean |
omitTermFreqAndPositions() |
boolean |
sortMissingFirst() |
boolean |
sortMissingLast() |
boolean |
stored() |
boolean |
storeOffsetsWithPositions() |
boolean |
storeTermOffsets() |
boolean |
storeTermPayloads() |
boolean |
storeTermPositions() |
boolean |
storeTermVector() |
String |
toString() |
boolean |
useDocValuesAsStored() |
void |
write(TextResponseWriter writer,
String name,
IndexableField val) |
public SchemaField(String name, FieldType type)
public SchemaField(SchemaField prototype, String name)
public SchemaField(String name, FieldType type, int properties, String defaultValue)
public String getName()
public FieldType getType()
public int getProperties()
public boolean indexed()
public boolean stored()
public boolean hasDocValues()
public boolean storeTermVector()
public boolean storeTermPositions()
public boolean storeTermOffsets()
public boolean storeTermPayloads()
public boolean omitNorms()
public boolean omitTermFreqAndPositions()
public boolean omitPositions()
public boolean storeOffsetsWithPositions()
public boolean useDocValuesAsStored()
public boolean multiValued()
public boolean sortMissingFirst()
public boolean sortMissingLast()
public boolean isRequired()
public boolean isLarge()
public IndexableField createField(Object val, float boost)
public List<IndexableField> createFields(Object val, float boost)
public boolean isPolyField()
createFields(Object, float)
, else use createField(java.lang.Object, float)
to save an extra allocationpublic void write(TextResponseWriter writer, String name, IndexableField val) throws IOException
IOException
public SortField getSortField(boolean top)
public void checkSortability() throws SolrException
public void checkFieldCacheSource() throws SolrException
public String getDefaultValue()
public SimpleOrderedMap<Object> getNamedPropertyValues(boolean showDefaults)
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.