public class UUIDField extends StrField
This FieldType accepts UUID string values, as well as the special value of "NEW" which triggers generation of a new random UUID.
NOTE: Configuring a UUIDField
instance with a default value of "NEW" is not advisable for
most users when using SolrCloud (and not possible if the UUID value is
configured as the unique key field) since the result will be that each
replica of each document will get a unique UUID value.
Using UUIDUpdateProcessorFactory to generate UUID values when
documents are added is recommended instead.
UUID.toString(),
UUID.randomUUID()FieldType.DefaultAnalyzer, FieldType.MultiValueSelectorANALYZER, args, AUTO_GENERATE_PHRASE_QUERIES, CHAR_FILTER, CHAR_FILTERS, CLASS_NAME, docValuesFormat, ENABLE_GRAPH_QUERIES, falseProperties, FILTER, FILTERS, INDEX, INDEX_ANALYZER, MULTI_TERM, MULTI_TERM_ANALYZER, POLY_FIELD_SEPARATOR, postingsFormat, properties, QUERY, QUERY_ANALYZER, similarity, SIMILARITY, similarityFactory, SYNONYM_QUERY_STYLE, TOKENIZER, trueProperties, TYPE, TYPE_NAME, typeNameBINARY, 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 |
|---|
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
|
createFields, getBytesRef, getSingleValueSource, getUninversionType, getValueSource, isUtf8Field, marshalSortValue, toObject, unmarshalSortValuecheckSupportsDocValues, getDefaultMultiValueSelectorForSortcheckSchemaField, createField, createField, getAnalyzerProperties, getClassArg, getDocValuesFormat, getFieldQuery, getIndexAnalyzer, getNamedPropertyValues, getNonFieldPropertyArgs, getNumberType, getNumericSort, getPostingsFormat, getPrefixQuery, getQueryAnalyzer, getRangeQuery, getRewriteMethod, getSetQuery, getSimilarity, getSimilarityFactory, getSortedNumericSortField, getSortedSetSortField, getSortField, getStringSort, getTypeName, hasProperty, indexedToReadable, indexedToReadable, isExplicitAnalyzer, isExplicitQueryAnalyzer, isMultiValued, isPointField, isPolyField, isTokenized, marshalBase64SortValue, marshalStringSortValue, multiValuedFieldCache, readableToIndexed, readableToIndexed, restrictProps, setArgs, setIndexAnalyzer, setIsExplicitAnalyzer, setIsExplicitQueryAnalyzer, setQueryAnalyzer, setSimilarity, storedToIndexed, storedToReadable, supportsAnalyzers, toExternal, toNativeType, toString, unmarshalBase64SortValue, unmarshalStringSortValue, useDocValuesAsStored, writeprotected void init(IndexSchema schema, Map<String,String> args)
FieldTypepublic SortField getSortField(SchemaField field, boolean reverse)
FieldTypepublic void write(TextResponseWriter writer, String name, IndexableField f) throws IOException
FieldTypewrite in class StrFieldIOExceptionpublic String toInternal(String val)
toInternal in class FieldTypeval - The value of the fieldFieldType.toInternal(java.lang.String)public UUID toObject(IndexableField f)
FieldTypetoObject in class FieldTypeFieldType.toInternal(java.lang.String)Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.