public class UUIDField extends StrField
UUID.toString()
,
UUID.randomUUID()
FieldType.DefaultAnalyzer
analyzer, args, falseProperties, log, POLY_FIELD_SEPARATOR, postingsFormat, queryAnalyzer, similarity, trueProperties, typeName
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 |
---|
UUIDField() |
Modifier and Type | Method and Description |
---|---|
SortField |
getSortField(SchemaField field,
boolean reverse)
Returns the SortField instance that should be used to sort fields
of this type.
|
protected void |
init(IndexSchema schema,
Map<String,String> args)
subclasses should initialize themselves with the args provided
and remove valid arguments.
|
String |
toInternal(String val)
Generates a UUID if val is either null, empty or "NEW".
|
String |
toInternal(UUID uuid) |
UUID |
toObject(IndexableField f)
Convert the stored-field format to an external object.
|
void |
write(TextResponseWriter writer,
String name,
IndexableField f)
calls back to TextResponseWriter to write the field value
|
getValueSource, toObject
checkSchemaField, createField, createField, createFields, getAnalyzer, getArg, getFieldQuery, getIndexOptions, getPostingsFormat, getQueryAnalyzer, getRangeQuery, getSimilarity, getStringSort, getTypeName, hasProperty, indexedToReadable, indexedToReadable, isMultiValued, isPolyField, isTokenized, multiValuedFieldCache, readableToIndexed, readableToIndexed, restrictProps, setAnalyzer, setQueryAnalyzer, setSimilarity, storedToIndexed, storedToReadable, toExternal, toString
protected void init(IndexSchema schema, Map<String,String> args)
FieldType
init
in class PrimitiveFieldType
public SortField getSortField(SchemaField field, boolean reverse)
FieldType
getSortField
in class StrField
SchemaField.checkSortability()
public void write(TextResponseWriter writer, String name, IndexableField f) throws IOException
FieldType
write
in class StrField
IOException
public String toInternal(String val)
toInternal
in class FieldType
val
- The value of the fieldFieldType.toInternal(java.lang.String)
public UUID toObject(IndexableField f)
FieldType
toObject
in class FieldType
FieldType.toInternal(java.lang.String)
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.