public final class IndexBuilder extends Object
Constructor and Description |
---|
IndexBuilder() |
Modifier and Type | Method and Description |
---|---|
static FullTextIndex |
fullTextIndex(FullTextIndexItem... items)
Create a full-text search index with the given index item and options.
|
static PredictiveIndex |
predictiveIndex(String model,
Expression input,
List<String> properties)
ENTERPRISE EDITION API
|
static ValueIndex |
valueIndex(ValueIndexItem... items)
Create a value index with the given index items.
|
@NonNull public static PredictiveIndex predictiveIndex(@NonNull String model, @NonNull Expression input, List<String> properties)
Create a predictive index with the given predictive model name, input specification to the predictive model, and the properties of the prediction result.
The input given specification should be matched to the input specification given to the query prediction() function so that the predictive index can be matched and used in query.
The predictive index is different from the normal index in that the predictive index will also cache the prediction result along with creating the value index of the specified properties. If the properties are not specified, the predictive index will only cache the prediction result so that the prediction model will not be called again after indexing. If multiple properties are specified, a compound value index will be created from the given properties.
model
- The predictive model name.input
- The input specification that should be matched with the input
specification given to the query prediction function.properties
- The prediction result's properties to be indexed.public static ValueIndex valueIndex(@NonNull ValueIndexItem... items)
items
- The index itemspublic static FullTextIndex fullTextIndex(@NonNull FullTextIndexItem... items)
items
- The index items.