IndexingPolicy 类
定义
Represents the indexing policy configuration for a collection in the Azure Cosmos DB database service.
public class IndexingPolicy extends JsonSerializable
- 继承
继承成员
构造函数
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. The following example shows how to override the default indexingPolicy for root path:
If you would like to just override the indexingPolicy for Numbers you can specify just that:
|
IndexingPolicy(JSONObject jsonObject) |
Constructor.
|
IndexingPolicy(String jsonString) |
Constructor.
|
方法
getAutomatic() |
Gets whether automatic indexing is enabled for a collection. In automatic indexing, documents can be explicitly excluded from indexing using RequestOptions. In manual indexing, documents can be explicitly included.
|
getExcludedPaths() |
Gets the paths that are not indexed.
|
getIncludedPaths() |
Gets the paths that are chosen to be indexed by the user.
|
getIndexingMode() |
Gets the indexing mode (consistent or lazy).
|
setAutomatic(boolean automatic) |
Sets whether automatic indexing is enabled for a collection. In automatic indexing, documents can be explicitly excluded from indexing using RequestOptions. In manual indexing, documents can be explicitly included.
|
setExcludedPaths(Collection<ExcludedPath> excludedPaths) | |
setIncludedPaths(Collection<IncludedPath> includedPaths) | |
setIndexingMode(IndexingMode indexingMode) |
Sets the indexing mode (consistent or lazy).
|