Partager via


IndexingPolicy Class

  • java.lang.Object
    • com.azure.resourcemanager.cosmos.models.IndexingPolicy

Implements

public final class IndexingPolicy
implements JsonSerializable<IndexingPolicy>

Cosmos DB indexing policy.

Constructor Summary

Constructor Description
IndexingPolicy()

Creates an instance of IndexingPolicy class.

Method Summary

Modifier and Type Method and Description
Boolean automatic()

Get the automatic property: Indicates if the indexing policy is automatic.

List<List<CompositePath>> compositeIndexes()

Get the compositeIndexes property: List of composite path list.

List<ExcludedPath> excludedPaths()

Get the excludedPaths property: List of paths to exclude from indexing.

static IndexingPolicy fromJson(JsonReader jsonReader)

Reads an instance of IndexingPolicy from the JsonReader.

List<IncludedPath> includedPaths()

Get the includedPaths property: List of paths to include in the indexing.

IndexingMode indexingMode()

Get the indexingMode property: Indicates the indexing mode.

List<SpatialSpec> spatialIndexes()

Get the spatialIndexes property: List of spatial specifics.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

List<VectorIndex> vectorIndexes()

Get the vectorIndexes property: List of paths to include in the vector indexing.

IndexingPolicy withAutomatic(Boolean automatic)

Set the automatic property: Indicates if the indexing policy is automatic.

IndexingPolicy withCompositeIndexes(List<List<CompositePath>> compositeIndexes)

Set the compositeIndexes property: List of composite path list.

IndexingPolicy withExcludedPaths(List<ExcludedPath> excludedPaths)

Set the excludedPaths property: List of paths to exclude from indexing.

IndexingPolicy withIncludedPaths(List<IncludedPath> includedPaths)

Set the includedPaths property: List of paths to include in the indexing.

IndexingPolicy withIndexingMode(IndexingMode indexingMode)

Set the indexingMode property: Indicates the indexing mode.

IndexingPolicy withSpatialIndexes(List<SpatialSpec> spatialIndexes)

Set the spatialIndexes property: List of spatial specifics.

IndexingPolicy withVectorIndexes(List<VectorIndex> vectorIndexes)

Set the vectorIndexes property: List of paths to include in the vector indexing.

Methods inherited from java.lang.Object

Constructor Details

IndexingPolicy

public IndexingPolicy()

Creates an instance of IndexingPolicy class.

Method Details

automatic

public Boolean automatic()

Get the automatic property: Indicates if the indexing policy is automatic.

Returns:

the automatic value.

compositeIndexes

public List> compositeIndexes()

Get the compositeIndexes property: List of composite path list.

Returns:

the compositeIndexes value.

excludedPaths

public List excludedPaths()

Get the excludedPaths property: List of paths to exclude from indexing.

Returns:

the excludedPaths value.

fromJson

public static IndexingPolicy fromJson(JsonReader jsonReader)

Reads an instance of IndexingPolicy from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of IndexingPolicy if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the IndexingPolicy.

includedPaths

public List includedPaths()

Get the includedPaths property: List of paths to include in the indexing.

Returns:

the includedPaths value.

indexingMode

public IndexingMode indexingMode()

Get the indexingMode property: Indicates the indexing mode.

Returns:

the indexingMode value.

spatialIndexes

public List spatialIndexes()

Get the spatialIndexes property: List of spatial specifics.

Returns:

the spatialIndexes value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

vectorIndexes

public List vectorIndexes()

Get the vectorIndexes property: List of paths to include in the vector indexing.

Returns:

the vectorIndexes value.

withAutomatic

public IndexingPolicy withAutomatic(Boolean automatic)

Set the automatic property: Indicates if the indexing policy is automatic.

Parameters:

automatic - the automatic value to set.

Returns:

the IndexingPolicy object itself.

withCompositeIndexes

public IndexingPolicy withCompositeIndexes(List> compositeIndexes)

Set the compositeIndexes property: List of composite path list.

Parameters:

compositeIndexes - the compositeIndexes value to set.

Returns:

the IndexingPolicy object itself.

withExcludedPaths

public IndexingPolicy withExcludedPaths(List excludedPaths)

Set the excludedPaths property: List of paths to exclude from indexing.

Parameters:

excludedPaths - the excludedPaths value to set.

Returns:

the IndexingPolicy object itself.

withIncludedPaths

public IndexingPolicy withIncludedPaths(List includedPaths)

Set the includedPaths property: List of paths to include in the indexing.

Parameters:

includedPaths - the includedPaths value to set.

Returns:

the IndexingPolicy object itself.

withIndexingMode

public IndexingPolicy withIndexingMode(IndexingMode indexingMode)

Set the indexingMode property: Indicates the indexing mode.

Parameters:

indexingMode - the indexingMode value to set.

Returns:

the IndexingPolicy object itself.

withSpatialIndexes

public IndexingPolicy withSpatialIndexes(List spatialIndexes)

Set the spatialIndexes property: List of spatial specifics.

Parameters:

spatialIndexes - the spatialIndexes value to set.

Returns:

the IndexingPolicy object itself.

withVectorIndexes

public IndexingPolicy withVectorIndexes(List vectorIndexes)

Set the vectorIndexes property: List of paths to include in the vector indexing.

Parameters:

vectorIndexes - the vectorIndexes value to set.

Returns:

the IndexingPolicy object itself.

Applies to