|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.solr.schema.FieldProperties org.apache.solr.schema.SchemaField
public final class SchemaField
Encapsulates all information about a Field in a Solr Schema
Field Summary |
---|
Fields inherited from class org.apache.solr.schema.FieldProperties |
---|
BINARY, DOC_VALUES, 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 Summary | |
---|---|
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. |
Method Summary | |
---|---|
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)
|
List<IndexableField> |
createFields(Object val,
float boost)
|
boolean |
equals(Object obj)
|
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 |
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. Use omitTermFreqAndPositions() |
boolean |
sortMissingFirst()
|
boolean |
sortMissingLast()
|
boolean |
stored()
|
boolean |
storeOffsetsWithPositions()
|
boolean |
storeTermOffsets()
|
boolean |
storeTermPositions()
|
boolean |
storeTermVector()
|
String |
toString()
|
void |
write(TextResponseWriter writer,
String name,
IndexableField val)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SchemaField(String name, FieldType type)
public SchemaField(SchemaField prototype, String name)
public SchemaField(String name, FieldType type, int properties, String defaultValue)
Method Detail |
---|
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 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 List<IndexableField> createFields(Object val, float boost)
public boolean isPolyField()
createFields(Object, float)
, else use createField(java.lang.Object, float)
to save an extra allocation
public String toString()
toString
in class Object
public void write(TextResponseWriter writer, String name, IndexableField val) throws IOException
IOException
public SortField getSortField(boolean top)
FieldType.getSortField(org.apache.solr.schema.SchemaField, boolean)
public void checkSortability() throws SolrException
SolrException
FieldType.getSortField(org.apache.solr.schema.SchemaField, boolean)
public void checkFieldCacheSource(QParser parser) throws SolrException
SolrException
FieldType.getValueSource(org.apache.solr.schema.SchemaField, org.apache.solr.search.QParser)
public String getDefaultValue()
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public SimpleOrderedMap<Object> getNamedPropertyValues(boolean showDefaults)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |