| java.lang.Object org.apache.solr.schema.FieldProperties
All known Subclasses: org.apache.solr.schema.SchemaField, org.apache.solr.schema.FieldType,
FieldProperties | abstract class FieldProperties (Code) | | author: yonik version: $Id: FieldProperties.java 533571 2007-04-29 23:03:03Z ryan $ |
BINARY | final static int BINARY(Code) | | |
COMPRESSED | final static int COMPRESSED(Code) | | |
INDEXED | final static int INDEXED(Code) | | |
MULTIVALUED | final static int MULTIVALUED(Code) | | |
OMIT_NORMS | final static int OMIT_NORMS(Code) | | |
REQUIRED | final static int REQUIRED(Code) | | |
SORT_MISSING_FIRST | final static int SORT_MISSING_FIRST(Code) | | |
SORT_MISSING_LAST | final static int SORT_MISSING_LAST(Code) | | |
STORED | final static int STORED(Code) | | |
STORE_TERMOFFSETS | final static int STORE_TERMOFFSETS(Code) | | |
STORE_TERMPOSITIONS | final static int STORE_TERMPOSITIONS(Code) | | |
STORE_TERMVECTORS | final static int STORE_TERMVECTORS(Code) | | |
TOKENIZED | final static int TOKENIZED(Code) | | |
getPropertyName | static String getPropertyName(int property)(Code) | | Returns the symbolic name for the property.
|
off | static boolean off(int bitfield, int props)(Code) | | |
on | static boolean on(int bitfield, int props)(Code) | | |
parseProperties | static int parseProperties(Map<String, String> properties, boolean which)(Code) | | static int normalize(int properties) {
int p = properties;
if (on(p,TOKENIZED) && off(p,INDEXED)) {
throw new RuntimeException("field must be indexed to be tokenized.");
}
if (on(p,STORE_TERMPOSITIONS)) p|=STORE_TERMVECTORS;
if (on(p,STORE_TERMOFFSETS)) p|=STORE_TERMVECTORS;
if (on(p,STORE_TERMOFFSETS) && off(p,INDEXED)) {
throw new RuntimeException("field must be indexed to store term vectors.");
}
if (on(p,OMIT_NORMS) && off(p,INDEXED)) {
throw new RuntimeException("field must be indexed for norms to be omitted.");
}
if (on(p,SORT_MISSING_FIRST) && on(p,SORT_MISSING_LAST)) {
throw new RuntimeException("conflicting options sortMissingFirst,sortMissingLast.");
}
if ((on(p,SORT_MISSING_FIRST) || on(p,SORT_MISSING_LAST)) && off(p,INDEXED)) {
throw new RuntimeException("field must be indexed to be sorted.");
}
if ((on(p,BINARY) || on(p,COMPRESSED)) && off(p,STORED)) {
throw new RuntimeException("field must be stored for compressed or binary options.");
}
return p;
}
|
propertiesToString | static String propertiesToString(int properties)(Code) | | |
propertyNameToInt | static int propertyNameToInt(String name)(Code) | | |
|
|