Package com.couchbase.lite
Class ArrayIndexConfiguration
java.lang.Object
com.couchbase.lite.IndexConfiguration
com.couchbase.lite.ArrayIndexConfiguration
Configuration for indexing property values within nested arrays
in documents, intended for use with the UNNEST query.
-
Constructor Summary
ConstructorDescriptionInitializes the configuration with paths to the nested array with no expressions constraining the values within the arrays to be indexed.ArrayIndexConfiguration
(String path, String expression, String... expressions) Initializes the configuration with paths to the nested array and the expressions for the values within the arrays to be indexed.ArrayIndexConfiguration
(String path, List<String> expressions) Initializes the configuration with paths to the nested array and the expressions for the values within the arrays to be indexed. -
Method Summary
Methods inherited from class com.couchbase.lite.IndexConfiguration
getExpressions
-
Constructor Details
-
ArrayIndexConfiguration
Initializes the configuration with paths to the nested array with no expressions constraining the values within the arrays to be indexed.- Parameters:
path
- Path to the array, which can be nested to be indexed. Use "[]" to represent a property that is an array of each nested array level. For a single array or the last level array, the "[]" is optional. For instance, use "contacts[].phones" to specify an array of phones within each contact.
-
ArrayIndexConfiguration
public ArrayIndexConfiguration(@NonNull String path, @NonNull String expression, @Nullable String... expressions) Initializes the configuration with paths to the nested array and the expressions for the values within the arrays to be indexed. A null expression will cause a runtime error.- Parameters:
path
- Path to the array, which can be nested to be indexed. Use "[]" to represent a property that is an array of each nested array level. For a single array or the last level array, the "[]" is optional. For instance, use "contacts[].phones" to specify an array of phones within each contact.expressions
- A list of strings, where each string represents an expression defining the values within the array to be indexed. Expressions may not be null.
-
ArrayIndexConfiguration
Initializes the configuration with paths to the nested array and the expressions for the values within the arrays to be indexed.- Parameters:
path
- Path to the array, which can be nested to be indexed. Use "[]" to represent a property that is an array of each nested array level. For a single array or the last level array, the "[]" is optional. For instance, use "contacts[].phones" to specify an array of phones within each contact.expressions
- An optional list of strings, where each string represents an expression defining the values within the array to be indexed. If the array specified by the path contains scalar values, this parameter can be null: seeArrayIndexConfiguration(String)
-
-
Method Details
-
getPath
Path to the array, which can be nested.
-