public final class SchemaField extends FieldProperties
BINARY, INDEXED, MULTIVALUED, OMIT_NORMS, OMIT_POSITIONS, OMIT_TF_POSITIONS, REQUIRED, SORT_MISSING_FIRST, SORT_MISSING_LAST, STORE_OFFSETS, STORE_TERMOFFSETS, STORE_TERMPOSITIONS, STORE_TERMVECTORS, STORED, TOKENIZED
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(QParser parser)
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) |
IndexableField[] |
createFields(Object val,
float boost) |
boolean |
equals(Object obj) |
String |
getDefaultValue() |
String |
getName() |
SortField |
getSortField(boolean top)
Delegates to the FieldType for this field
|
FieldType |
getType() |
int |
hashCode() |
boolean |
indexed() |
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 |
omitTf()
Deprecated.
|
boolean |
sortMissingFirst() |
boolean |
sortMissingLast() |
boolean |
stored() |
boolean |
storeOffsetsWithPositions() |
boolean |
storeTermOffsets() |
boolean |
storeTermPositions() |
boolean |
storeTermVector() |
String |
toString() |
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 boolean indexed()
public boolean stored()
public boolean storeTermVector()
public boolean storeTermPositions()
public boolean storeTermOffsets()
public boolean omitNorms()
@Deprecated public boolean omitTf()
omitTermFreqAndPositions()
public boolean omitTermFreqAndPositions()
public boolean omitPositions()
public boolean storeOffsetsWithPositions()
public boolean multiValued()
public boolean sortMissingFirst()
public boolean sortMissingLast()
public boolean isRequired()
public IndexableField createField(Object val, float boost)
public 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(QParser parser) throws SolrException
public String getDefaultValue()
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.