public final class IndexingPolicy extends JsonSerializable
Constructor and Description |
---|
IndexingPolicy()
Constructor.
|
IndexingPolicy(Index[] defaultIndexOverrides)
Initializes a new instance of the IndexingPolicy class with the specified set of indexes as
default index specifications for the root path.
|
Modifier and Type | Method and Description |
---|---|
Boolean |
getAutomatic()
Gets whether automatic indexing is enabled for a collection.
|
List<List<CompositePath>> |
getCompositeIndexes()
Gets the composite indexes for additional indexes.
|
List<ExcludedPath> |
getExcludedPaths()
Gets the paths that are not indexed.
|
List<IncludedPath> |
getIncludedPaths()
Gets the paths that are chosen to be indexed by the user.
|
IndexingMode |
getIndexingMode()
Gets the indexing mode (consistent or lazy).
|
List<SpatialSpec> |
getSpatialIndexes()
Sets the spatial indexes for additional indexes.
|
IndexingPolicy |
setAutomatic(boolean automatic)
Sets whether automatic indexing is enabled for a collection.
|
IndexingPolicy |
setCompositeIndexes(List<List<CompositePath>> compositeIndexes)
Sets the composite indexes for additional indexes.
|
IndexingPolicy |
setExcludedPaths(List<ExcludedPath> excludedPaths) |
void |
setIncludedPaths(List<IncludedPath> includedPaths) |
IndexingPolicy |
setIndexingMode(IndexingMode indexingMode)
Sets the indexing mode (consistent or lazy).
|
IndexingPolicy |
setSpatialIndexes(List<SpatialSpec> spatialIndexes)
Sets the spatial indexes for additional indexes.
|
get, getBoolean, getCollection, getDouble, getInt, getList, getLogger, getLong, getMap, getObject, getObjectByPath, getString, has, toJson, toJson, toObject, toString
public IndexingPolicy()
public IndexingPolicy(Index[] defaultIndexOverrides)
The following example shows how to override the default indexingPolicy for root path:
defaultIndexOverrides
- comma separated set of indexes that serve as default index specifications for the
root path.IllegalArgumentException
- thrown if an error occurspublic Boolean getAutomatic()
In automatic indexing, documents can be explicitly excluded from indexing using RequestOptions. In manual indexing, documents can be explicitly included.
public IndexingPolicy setAutomatic(boolean automatic)
In automatic indexing, documents can be explicitly excluded from indexing using RequestOptions. In manual indexing, documents can be explicitly included.
automatic
- the automaticpublic IndexingMode getIndexingMode()
public IndexingPolicy setIndexingMode(IndexingMode indexingMode)
indexingMode
- the indexing mode.public List<IncludedPath> getIncludedPaths()
public void setIncludedPaths(List<IncludedPath> includedPaths)
public List<ExcludedPath> getExcludedPaths()
public IndexingPolicy setExcludedPaths(List<ExcludedPath> excludedPaths)
public List<List<CompositePath>> getCompositeIndexes()
public IndexingPolicy setCompositeIndexes(List<List<CompositePath>> compositeIndexes)
compositeIndexes
- the composite indexes.public List<SpatialSpec> getSpatialIndexes()
public IndexingPolicy setSpatialIndexes(List<SpatialSpec> spatialIndexes)
spatialIndexes
- the spatial indexes.Copyright © 2020 Microsoft Corporation. All rights reserved.