Class IndexBuilder
A factory class for creating IIndex instances
Inheritance
Namespace: Couchbase.Lite.Query
Assembly: Couchbase.Lite.dll
Syntax
public static class IndexBuilder : object
Methods
| Improve this Doc View SourceFullTextIndex(IFullTextIndexItem[])
Starts the creation of an index based on a full text search
Declaration
public static IFullTextIndex FullTextIndex(params IFullTextIndexItem[] items)
Parameters
Type | Name | Description |
---|---|---|
IFullTextIndexItem[] | items | The items to use to create the index |
Returns
Type | Description |
---|---|
IFullTextIndex | The beginning of an FTS based index |
PredictiveIndex(String, IExpression, String[])
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 Prediction(String, IExpression) 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
Declaration
public static IPredictiveIndex PredictiveIndex(string model, IExpression input, params string[] properties)
Parameters
Type | Name | Description |
---|---|---|
System.String | model | The predictive model name |
IExpression | input | The input specification that should be matched with the input specification given to Prediction(String, IExpression) |
System.String[] | properties | The prediction result's properties to be indexed |
Returns
Type | Description |
---|---|
IPredictiveIndex | The predictive index |
Remarks
NOTE: This is an enterprise edition feature
ValueIndex(IValueIndexItem[])
Starts the creation of an index based on a simple property
Declaration
public static IValueIndex ValueIndex(params IValueIndexItem[] items)
Parameters
Type | Name | Description |
---|---|---|
IValueIndexItem[] | items | The items to use to create the index |
Returns
Type | Description |
---|---|
IValueIndex | The beginning of a value based index |