Compartir a través de


SimilarityAlgorithm Class

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

Implements

public class SimilarityAlgorithm
implements JsonSerializable<SimilarityAlgorithm>

Base type for similarity algorithms. Similarity algorithms are used to calculate scores that tie queries to documents. The higher the score, the more relevant the document is to that specific query. Those scores are used to rank the search results.

Constructor Summary

Constructor Description
SimilarityAlgorithm()

Creates an instance of SimilarityAlgorithm class.

Method Summary

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

Reads an instance of SimilarityAlgorithm from the JsonReader.

String getOdataType()

Get the odataType property: The @odata.type property.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

SimilarityAlgorithm

public SimilarityAlgorithm()

Creates an instance of SimilarityAlgorithm class.

Method Details

fromJson

public static SimilarityAlgorithm fromJson(JsonReader jsonReader)

Reads an instance of SimilarityAlgorithm from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

getOdataType

public String getOdataType()

Get the odataType property: The @odata.type property.

Returns:

the odataType value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to