IndexingPolicy Class
- java.
lang. Object - com.
azure. cosmos. models. IndexingPolicy
- com.
public final class IndexingPolicy
Represents the indexing policy configuration for a container in the Azure Cosmos DB database service.
Constructor Summary
Constructor | Description |
---|---|
IndexingPolicy() |
Constructor. |
Method Summary
Modifier and Type | Method and Description |
---|---|
List<List<Composite |
getCompositeIndexes()
Gets the composite indexes for additional indexes. |
List<Excluded |
getExcludedPaths()
Gets the paths that are not indexed. |
List<Included |
getIncludedPaths()
Gets the paths that are chosen to be indexed by the user. |
Indexing |
getIndexingMode()
Gets the indexing mode (consistent or lazy). |
List<Spatial |
getSpatialIndexes()
Sets the spatial indexes for additional indexes. |
Boolean |
isAutomatic()
Gets whether automatic indexing is enabled for a container. |
Indexing |
setAutomatic(boolean automatic)
Sets whether automatic indexing is enabled for a container. |
Indexing |
setCompositeIndexes(List<List<CompositePath>> compositeIndexes)
Sets the composite indexes for additional indexes. |
Indexing |
setExcludedPaths(List<ExcludedPath> excludedPaths)
Sets excluded paths. |
Indexing |
setIncludedPaths(List<IncludedPath> includedPaths)
Sets included paths. |
Indexing |
setIndexingMode(IndexingMode indexingMode)
Sets the indexing mode (consistent or lazy). |
Indexing |
setSpatialIndexes(List<SpatialSpec> spatialIndexes)
Sets the spatial indexes for additional indexes. |
Methods inherited from java.lang.Object
Constructor Details
IndexingPolicy
public IndexingPolicy()
Constructor.
Method Details
getCompositeIndexes
public List<>
Gets the composite indexes for additional indexes.
Returns:
getExcludedPaths
public List
Gets the paths that are not indexed.
Returns:
getIncludedPaths
public List
Gets the paths that are chosen to be indexed by the user.
Returns:
getIndexingMode
public IndexingMode getIndexingMode()
Gets the indexing mode (consistent or lazy).
Returns:
getSpatialIndexes
public List
Sets the spatial indexes for additional indexes.
Returns:
isAutomatic
public Boolean isAutomatic()
Gets whether automatic indexing is enabled for a container.
In automatic indexing, items can be explicitly excluded from indexing using RequestOptions. In manual indexing, items can be explicitly included.
Returns:
setAutomatic
public IndexingPolicy setAutomatic(boolean automatic)
Sets whether automatic indexing is enabled for a container.
In automatic indexing, items can be explicitly excluded from indexing using RequestOptions. In manual indexing, items can be explicitly included.
Parameters:
Returns:
setCompositeIndexes
public IndexingPolicy setCompositeIndexes(List<>
Sets the composite indexes for additional indexes.
Parameters:
Returns:
setExcludedPaths
public IndexingPolicy setExcludedPaths(List
Sets excluded paths.
Parameters:
Returns:
setIncludedPaths
public IndexingPolicy setIncludedPaths(List
Sets included paths.
Parameters:
Returns:
setIndexingMode
public IndexingPolicy setIndexingMode(IndexingMode indexingMode)
Sets the indexing mode (consistent or lazy).
Parameters:
Returns:
setSpatialIndexes
public IndexingPolicy setSpatialIndexes(List
Sets the spatial indexes for additional indexes.
Parameters:
Returns:
Applies to
Azure SDK for Java
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for