Class LuceneIndexOptions
java.lang.Object
com.apple.foundationdb.record.lucene.LuceneIndexOptions
Options for use with Lucene indexes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The name of the Lucene analyzer to use for auto-complete query.static final String
The override mapping from fields to Lucene analyzers for auto-complete query, if they want to use different analyzers than the default one.static final String
The delimiter by which the elements are split if the option's value has multiple elements or key-value pairs.static final String
The delimiter by which the key and value of one key-value pair within the option's value is split.static final String
Option to designate a record field as the timestamp by which the corresponding document would be partitioned in Lucene.static final String
Option to set high watermark size for a lucene partition, beyond which the partition would be split, or a new partition would be created.static final String
Option to set low watermark size for a lucene partition, below which the partition would be a candidate for merge with another adjacent partition.static final String
The name of the Lucene analyzer to use for full-text search.static final String
The override mapping from fields to Lucene analyzers, if they want to use different analyzer than the default one.static final String
Whether a Lucene's EdgeNGramTokenFilter or a regular NGramTokenFilter to use for the ngram analyzer.static final String
Whether to use the StoredFields format that stores data in K/V (TRUE) pairs or in the standard Lucene file (FALSE).static final String
Whether a separate B-tree index gives a direct mapping of live documents to segment by record primary key.static final String
Whether a separate B-tree index gives a direct mapping of live documents to segment by record primary key, that utilizes an optimized stored fields to manage merges.static final String
static final String
The name of the synonym set to use in Lucene. -
Method Summary
Modifier and TypeMethodDescriptionparseKeyValuePairOptionValue
(String optionValue) Parse an option's value to a key-value map.parseMultipleElementsOptionValue
(String optionValue) Parse an option's value to a set of strings.static void
validateKeyValuePairOptionValue
(String optionValue, RecordCoreException exceptionToThrow) Validate the raw string for an option's value has valid format for a key-value map.static void
validateMultipleElementsOptionValue
(String optionValue, RecordCoreException exceptionToThrow) Validate the raw string for an option's value has valid format for multiple-elements.
-
Field Details
-
DELIMITER_BETWEEN_KEY_AND_VALUE
The delimiter by which the key and value of one key-value pair within the option's value is split.- See Also:
-
DELIMITER_BETWEEN_ELEMENTS
The delimiter by which the elements are split if the option's value has multiple elements or key-value pairs.- See Also:
-
NGRAM_TOKEN_EDGES_ONLY
Whether a Lucene's EdgeNGramTokenFilter or a regular NGramTokenFilter to use for the ngram analyzer.- See Also:
-
LUCENE_ANALYZER_NAME_OPTION
The name of the Lucene analyzer to use for full-text search.- See Also:
-
LUCENE_ANALYZER_NAME_PER_FIELD_OPTION
The override mapping from fields to Lucene analyzers, if they want to use different analyzer than the default one. The format of the value should be "fieldName1:analyzerName1,fieldName2:analyzerName2...", with key-value pairs split by "," and each key and value split by ":".- See Also:
-
AUTO_COMPLETE_ANALYZER_NAME_OPTION
The name of the Lucene analyzer to use for auto-complete query.- See Also:
-
AUTO_COMPLETE_ANALYZER_NAME_PER_FIELD_OPTION
The override mapping from fields to Lucene analyzers for auto-complete query, if they want to use different analyzers than the default one. The format of the value should be "fieldName1:analyzerName1,fieldName2:analyzerName2...", with key-value pairs split by "," and each key and value split by ":".- See Also:
-
TEXT_SYNONYM_SET_NAME_OPTION
The name of the synonym set to use in Lucene.- See Also:
-
PRIMARY_KEY_SERIALIZATION_FORMAT
- See Also:
-
PRIMARY_KEY_SEGMENT_INDEX_ENABLED
Whether a separate B-tree index gives a direct mapping of live documents to segment by record primary key. Boolean string (true
orfalse
).- See Also:
-
OPTIMIZED_STORED_FIELDS_FORMAT_ENABLED
Whether to use the StoredFields format that stores data in K/V (TRUE) pairs or in the standard Lucene file (FALSE).- See Also:
-
INDEX_PARTITION_BY_FIELD_NAME
Option to designate a record field as the timestamp by which the corresponding document would be partitioned in Lucene.- See Also:
-
INDEX_PARTITION_HIGH_WATERMARK
Option to set high watermark size for a lucene partition, beyond which the partition would be split, or a new partition would be created.- See Also:
-
INDEX_PARTITION_LOW_WATERMARK
Option to set low watermark size for a lucene partition, below which the partition would be a candidate for merge with another adjacent partition.- See Also:
-
PRIMARY_KEY_SEGMENT_INDEX_V2_ENABLED
Whether a separate B-tree index gives a direct mapping of live documents to segment by record primary key, that utilizes an optimized stored fields to manage merges.Boolean string (
true
orfalse
).This is incompatible with
PRIMARY_KEY_SEGMENT_INDEX_ENABLED
, and thus only one can be enabled on an index. This impliesOPTIMIZED_STORED_FIELDS_FORMAT_ENABLED
, and thusOPTIMIZED_STORED_FIELDS_FORMAT_ENABLED
cannot be set (totrue
orfalse
) if this is enabled.- See Also:
-
-
Method Details
-
parseKeyValuePairOptionValue
Parse an option's value to a key-value map.- Parameters:
optionValue
- the raw string for option's value- Returns:
- the map
-
parseMultipleElementsOptionValue
Parse an option's value to a set of strings.- Parameters:
optionValue
- the raw string for option's value- Returns:
- map
-
validateKeyValuePairOptionValue
public static void validateKeyValuePairOptionValue(@Nonnull String optionValue, @Nonnull RecordCoreException exceptionToThrow) Validate the raw string for an option's value has valid format for a key-value map.- Parameters:
optionValue
- the raw string for option's valueexceptionToThrow
- the exception to throw if it is invalid
-
validateMultipleElementsOptionValue
public static void validateMultipleElementsOptionValue(@Nonnull String optionValue, @Nonnull RecordCoreException exceptionToThrow) Validate the raw string for an option's value has valid format for multiple-elements.- Parameters:
optionValue
- the raw string for option's valueexceptionToThrow
- the exception to throw if it is invalid
-