你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

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 discriminator for derived types.

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 discriminator for derived types.

Overrides:

ClassicSimilarityAlgorithm.getOdataType()

Returns:

the odataType value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

ClassicSimilarityAlgorithm.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to