Share via


ClassicSimilarityAlgorithm Class

public final class ClassicSimilarityAlgorithm
extends SimilarityAlgorithm

Legacy similarity algorithm which uses the Lucene TFIDFSimilarity implementation of TF-IDF. This variation of TF-IDF introduces static document length normalization as well as coordinating factors that penalize documents that only partially match the searched queries.

Constructor Summary

Constructor Description
ClassicSimilarityAlgorithm()

Creates an instance of ClassicSimilarityAlgorithm class.

Method Summary

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

Reads an instance of ClassicSimilarityAlgorithm from the JsonReader.

String getOdataType()

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

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from SimilarityAlgorithm

Methods inherited from java.lang.Object

Constructor Details

ClassicSimilarityAlgorithm

public ClassicSimilarityAlgorithm()

Creates an instance of ClassicSimilarityAlgorithm class.

Method Details

fromJson

public static ClassicSimilarityAlgorithm fromJson(JsonReader jsonReader)

Reads an instance of ClassicSimilarityAlgorithm from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

getOdataType

public String getOdataType()

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

Overrides:

ClassicSimilarityAlgorithm.getOdataType()

Returns:

the odataType value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

ClassicSimilarityAlgorithm.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to