Class TextIndexMaintainerFactory
- java.lang.Object
-
- com.apple.foundationdb.record.provider.foundationdb.indexes.TextIndexMaintainerFactory
-
- All Implemented Interfaces:
IndexMaintainerFactory
@AutoService(IndexMaintainerFactory.class) @API(EXPERIMENTAL) public class TextIndexMaintainerFactory extends Object implements IndexMaintainerFactory
Supplier ofTextIndexMaintainer
s, that is, of index maintainers for the full text index type.
-
-
Constructor Summary
Constructors Constructor Description TextIndexMaintainerFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IndexMaintainer
getIndexMaintainer(IndexMaintainerState state)
Get an index maintainer for the given record store and index meta-data.Iterable<String>
getIndexTypes()
A list containing only the name of the ""text"" index type.IndexValidator
getIndexValidator(Index index)
Validates that the index provided is valid for text indexes.
-
-
-
Method Detail
-
getIndexTypes
@Nonnull public Iterable<String> getIndexTypes()
A list containing only the name of the ""text"" index type. The maintainers produced by this factory only support that one type.- Specified by:
getIndexTypes
in interfaceIndexMaintainerFactory
- Returns:
- a list containing only the supported index type
-
getIndexValidator
@Nonnull public IndexValidator getIndexValidator(Index index)
Validates that the index provided is valid for text indexes. This means that the index must:- Not be a unique index.
- Not include a
VersionKeyExpression.VERSION
expression in its root expression. - Have a key expression whose first column is of type
string
(possibly with grouping columns before the tokenized text column) and is not repeated. - Specify a valid tokenizer and tokenizer version through the index options (possibly using the defaults).
- Not define a value expression.
- Specified by:
getIndexValidator
in interfaceIndexMaintainerFactory
- Parameters:
index
- the index to validate- Returns:
- a validator to run against the index
- Throws:
KeyExpression.InvalidExpressionException
- if the expression does not contain a string as its first ungrouped columnMetaDataException
- if the tokenizer is not defined, if the tokenizer version is out of range, or if the index is marked as unique
-
getIndexMaintainer
@Nonnull public IndexMaintainer getIndexMaintainer(IndexMaintainerState state)
Description copied from interface:IndexMaintainerFactory
Get an index maintainer for the given record store and index meta-data.- Specified by:
getIndexMaintainer
in interfaceIndexMaintainerFactory
- Parameters:
state
- the state of the new index maintainer- Returns:
- a new index maintainer for the type of index given
-
-