ExhaustiveKnnParameters Class

  • java.lang.Object
    • com.azure.search.documents.indexes.models.ExhaustiveKnnParameters

Implements

public final class ExhaustiveKnnParameters
implements JsonSerializable<ExhaustiveKnnParameters>

Contains the parameters specific to exhaustive KNN algorithm.

Constructor Summary

Constructor Description
ExhaustiveKnnParameters()

Creates an instance of ExhaustiveKnnParameters class.

Method Summary

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

Reads an instance of ExhaustiveKnnParameters from the JsonReader.

VectorSearchAlgorithmMetric getMetric()

Get the metric property: The similarity metric to use for vector comparisons.

ExhaustiveKnnParameters setMetric(VectorSearchAlgorithmMetric metric)

Set the metric property: The similarity metric to use for vector comparisons.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

ExhaustiveKnnParameters

public ExhaustiveKnnParameters()

Creates an instance of ExhaustiveKnnParameters class.

Method Details

fromJson

public static ExhaustiveKnnParameters fromJson(JsonReader jsonReader)

Reads an instance of ExhaustiveKnnParameters from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ExhaustiveKnnParameters 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 ExhaustiveKnnParameters.

getMetric

public VectorSearchAlgorithmMetric getMetric()

Get the metric property: The similarity metric to use for vector comparisons.

Returns:

the metric value.

setMetric

public ExhaustiveKnnParameters setMetric(VectorSearchAlgorithmMetric metric)

Set the metric property: The similarity metric to use for vector comparisons.

Parameters:

metric - the metric value to set.

Returns:

the ExhaustiveKnnParameters object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to