Partager via


VectorIndex Class

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

Implements

public final class VectorIndex
implements JsonSerializable<VectorIndex>

The VectorIndex model.

Constructor Summary

Constructor Description
VectorIndex()

Creates an instance of VectorIndex class.

Method Summary

Modifier and Type Method and Description
static VectorIndex fromJson(JsonReader jsonReader)

Reads an instance of VectorIndex from the JsonReader.

String path()

Get the path property: The path to the vector field in the document.

JsonWriter toJson(JsonWriter jsonWriter)
VectorIndexType type()

Get the type property: The index type of the vector.

void validate()

Validates the instance.

VectorIndex withPath(String path)

Set the path property: The path to the vector field in the document.

VectorIndex withType(VectorIndexType type)

Set the type property: The index type of the vector.

Methods inherited from java.lang.Object

Constructor Details

VectorIndex

public VectorIndex()

Creates an instance of VectorIndex class.

Method Details

fromJson

public static VectorIndex fromJson(JsonReader jsonReader)

Reads an instance of VectorIndex from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

path

public String path()

Get the path property: The path to the vector field in the document.

Returns:

the path value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public VectorIndexType type()

Get the type property: The index type of the vector. Currently, flat, diskANN, and quantizedFlat are supported.

Returns:

the type value.

validate

public void validate()

Validates the instance.

withPath

public VectorIndex withPath(String path)

Set the path property: The path to the vector field in the document.

Parameters:

path - the path value to set.

Returns:

the VectorIndex object itself.

withType

public VectorIndex withType(VectorIndexType type)

Set the type property: The index type of the vector. Currently, flat, diskANN, and quantizedFlat are supported.

Parameters:

type - the type value to set.

Returns:

the VectorIndex object itself.

Applies to