Class ClassicSimilarityAlgorithm

java.lang.Object
com.azure.search.documents.indexes.models.SimilarityAlgorithm
com.azure.search.documents.indexes.models.ClassicSimilarityAlgorithm
All Implemented Interfaces:
com.azure.json.JsonSerializable<SimilarityAlgorithm>

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 Details

    • ClassicSimilarityAlgorithm

      public ClassicSimilarityAlgorithm()
      Creates an instance of ClassicSimilarityAlgorithm class.
  • Method Details

    • getOdataType

      public String getOdataType()
      Get the odataType property: The @odata.type property.
      Overrides:
      getOdataType in class SimilarityAlgorithm
      Returns:
      the odataType value.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<SimilarityAlgorithm>
      Overrides:
      toJson in class SimilarityAlgorithm
      Throws:
      IOException
    • fromJson

      public static ClassicSimilarityAlgorithm fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.