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 |
getDocValuesFormat()
Expert/advanced method to get the field
DocValuesFormat. |
String |
getName() |
SimpleOrderedMap<Object> |
getNamedPropertyValues(boolean showDefaults)
Get a map of property name -> value for this field.
|
String |
getPostingsFormat()
Expert/advanced method to get the field
PostingsFormat. |
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 |
pointDimensionCount() |
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 IndexableFieldTypepublic boolean hasDocValues()
public boolean storeTermVector()
public boolean storeTermPositions()
public boolean storeTermOffsets()
public boolean storeTermPayloads()
public boolean omitNorms()
omitNorms in interface IndexableFieldTypepublic 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
IOExceptionpublic SortField getSortField(boolean top)
public String getPostingsFormat()
PostingsFormat.postingsFormat declared; or null if unspecified.public String getDocValuesFormat()
DocValuesFormat.docValuesFormat declared; or null if unspecified.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 IndexableFieldTypepublic boolean storeTermVectors()
storeTermVectors in interface IndexableFieldTypepublic boolean storeTermVectorOffsets()
storeTermVectorOffsets in interface IndexableFieldTypepublic boolean storeTermVectorPositions()
storeTermVectorPositions in interface IndexableFieldTypepublic boolean storeTermVectorPayloads()
storeTermVectorPayloads in interface IndexableFieldTypepublic IndexOptions indexOptions()
indexOptions in interface IndexableFieldTypepublic DocValuesType docValuesType()
docValuesType in interface IndexableFieldTypepublic int pointDimensionCount()
pointDimensionCount in interface IndexableFieldTypepublic int pointIndexDimensionCount()
pointIndexDimensionCount in interface IndexableFieldTypepublic int pointNumBytes()
pointNumBytes in interface IndexableFieldTypepublic Map<String,String> getAttributes()
getAttributes in interface IndexableFieldTypeCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.