public final class SchemaField extends FieldProperties implements IndexableFieldType
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, UNINVERTIBLE, 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) |
List<IndexableField> |
createFields(Object val) |
DocValuesType |
docValuesType() |
boolean |
equals(Object obj) |
Map<String,?> |
getArgs() |
Map<String,String> |
getAttributes() |
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() |
IndexOptions |
indexOptions() |
boolean |
isLarge() |
boolean |
isPolyField()
If true, then use
createFields(Object) , else use createField(java.lang.Object) to save an extra allocation |
boolean |
isRequired() |
boolean |
isUninvertible() |
boolean |
multiValued() |
boolean |
omitNorms() |
boolean |
omitPositions() |
boolean |
omitTermFreqAndPositions() |
int |
pointDataDimensionCount() |
int |
pointIndexDimensionCount() |
int |
pointNumBytes() |
boolean |
sortMissingFirst() |
boolean |
sortMissingLast() |
boolean |
stored() |
boolean |
storeOffsetsWithPositions() |
boolean |
storeTermOffsets() |
boolean |
storeTermPayloads() |
boolean |
storeTermPositions() |
boolean |
storeTermVector() |
boolean |
storeTermVectorOffsets() |
boolean |
storeTermVectorPayloads() |
boolean |
storeTermVectorPositions() |
boolean |
storeTermVectors() |
boolean |
tokenized() |
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 isUninvertible()
public boolean indexed()
public boolean stored()
stored
in interface IndexableFieldType
public boolean hasDocValues()
public boolean storeTermVector()
public boolean storeTermPositions()
public boolean storeTermOffsets()
public boolean storeTermPayloads()
public boolean omitNorms()
omitNorms
in interface IndexableFieldType
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)
public List<IndexableField> createFields(Object val)
public boolean isPolyField()
createFields(Object)
, else use createField(java.lang.Object)
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
FieldCacheSource
,
throwing an appropriate exception (including the field name) if it is not.
FieldType subclasses can choose to call this method in their
getValueSource implementationpublic String getDefaultValue()
public SimpleOrderedMap<Object> getNamedPropertyValues(boolean showDefaults)
public boolean tokenized()
tokenized
in interface IndexableFieldType
public boolean storeTermVectors()
storeTermVectors
in interface IndexableFieldType
public boolean storeTermVectorOffsets()
storeTermVectorOffsets
in interface IndexableFieldType
public boolean storeTermVectorPositions()
storeTermVectorPositions
in interface IndexableFieldType
public boolean storeTermVectorPayloads()
storeTermVectorPayloads
in interface IndexableFieldType
public IndexOptions indexOptions()
indexOptions
in interface IndexableFieldType
public DocValuesType docValuesType()
docValuesType
in interface IndexableFieldType
public int pointDataDimensionCount()
pointDataDimensionCount
in interface IndexableFieldType
public int pointIndexDimensionCount()
pointIndexDimensionCount
in interface IndexableFieldType
public int pointNumBytes()
pointNumBytes
in interface IndexableFieldType
public Map<String,String> getAttributes()
getAttributes
in interface IndexableFieldType
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.