Package com.azure.cosmos.models
Class IndexingPolicy
java.lang.Object
com.azure.cosmos.models.IndexingPolicy
Represents the indexing policy configuration for a container in the Azure Cosmos DB database service.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the composite indexes for additional indexes.Gets the full text search paths.Gets the paths that are not indexed.Gets the paths that are chosen to be indexed by the user.Gets the indexing mode (consistent or lazy).Gets the spatial indexes for additional indexes.Gets the vector indexes.Gets whether automatic indexing is enabled for a container.setAutomatic
(boolean automatic) Sets whether automatic indexing is enabled for a container.setCompositeIndexes
(List<List<CompositePath>> compositeIndexes) Sets the composite indexes for additional indexes.setCosmosFullTextIndexes
(List<CosmosFullTextIndex> cosmosFullTextIndexes) Sets the full text search paths.setExcludedPaths
(List<ExcludedPath> excludedPaths) Sets excluded paths.setIncludedPaths
(List<IncludedPath> includedPaths) Sets included paths.setIndexingMode
(IndexingMode indexingMode) Sets the indexing mode (consistent or lazy).setSpatialIndexes
(List<SpatialSpec> spatialIndexes) Sets the spatial indexes for additional indexes.setVectorIndexes
(List<CosmosVectorIndexSpec> vectorIndexes) Sets the vector indexes.
-
Constructor Details
-
IndexingPolicy
public IndexingPolicy()Constructor.
-
-
Method Details
-
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:
- the automatic
-
setAutomatic
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:
automatic
- the automatic- Returns:
- the Indexing Policy.
-
getIndexingMode
Gets the indexing mode (consistent or lazy).- Returns:
- the indexing mode.
-
setIndexingMode
Sets the indexing mode (consistent or lazy).- Parameters:
indexingMode
- the indexing mode.- Returns:
- the Indexing Policy.
-
getIncludedPaths
Gets the paths that are chosen to be indexed by the user.- Returns:
- the included paths.
-
setIncludedPaths
Sets included paths.- Parameters:
includedPaths
- the included paths- Returns:
- the included paths
-
getExcludedPaths
Gets the paths that are not indexed.- Returns:
- the excluded paths.
-
setExcludedPaths
Sets excluded paths.- Parameters:
excludedPaths
- the excluded paths- Returns:
- the excluded paths
-
getCompositeIndexes
Gets the composite indexes for additional indexes.- Returns:
- the composite indexes.
-
setCompositeIndexes
Sets the composite indexes for additional indexes.- Parameters:
compositeIndexes
- the composite indexes.- Returns:
- the Indexing Policy.
-
getSpatialIndexes
Gets the spatial indexes for additional indexes.- Returns:
- the spatial indexes.
-
setSpatialIndexes
Sets the spatial indexes for additional indexes.- Parameters:
spatialIndexes
- the spatial indexes.- Returns:
- the Indexing Policy.
-
getVectorIndexes
Gets the vector indexes.- Returns:
- the vector indexes
-
setVectorIndexes
Sets the vector indexes. Example of the vectorIndexes: "vectorIndexes": [ { "path": "/vector1", "type": "diskANN" }, { "path": "/vector1", "type": "flat" }, { "path": "/vector2", "type": "quantizedFlat" }]- Parameters:
vectorIndexes
- the vector indexes- Returns:
- the Indexing Policy.
-
getCosmosFullTextIndexes
@Beta(value=V4_65_0, warningText="Preview API - subject to change in non-backwards compatible way") public List<CosmosFullTextIndex> getCosmosFullTextIndexes()Gets the full text search paths.- Returns:
- the full text indexes.
-
setCosmosFullTextIndexes
@Beta(value=V4_65_0, warningText="Preview API - subject to change in non-backwards compatible way") public IndexingPolicy setCosmosFullTextIndexes(List<CosmosFullTextIndex> cosmosFullTextIndexes) Sets the full text search paths.- Parameters:
cosmosFullTextIndexes
- the fullText indexes- Returns:
- the excluded paths
-