SimilarityAlgorithm.java

  1. // Copyright (c) Microsoft Corporation. All rights reserved.
  2. // Licensed under the MIT License.
  3. //
  4. // Code generated by Microsoft (R) AutoRest Code Generator.
  5. // Changes may cause incorrect behavior and will be lost if the code is
  6. // regenerated.
  7. package com.azure.search.documents.indexes.models;

  8. import com.azure.core.annotation.Immutable;
  9. import com.fasterxml.jackson.annotation.JsonSubTypes;
  10. import com.fasterxml.jackson.annotation.JsonTypeInfo;
  11. import com.fasterxml.jackson.annotation.JsonTypeName;

  12. /**
  13.  * Base type for similarity algorithms. Similarity algorithms are used to calculate scores that tie queries to
  14.  * documents. The higher the score, the more relevant the document is to that specific query. Those scores are used to
  15.  * rank the search results.
  16.  */
  17. @JsonTypeInfo(
  18.         use = JsonTypeInfo.Id.NAME,
  19.         include = JsonTypeInfo.As.PROPERTY,
  20.         property = "@odata.type",
  21.         defaultImpl = SimilarityAlgorithm.class,
  22.         visible = true)
  23. @JsonSubTypes({
  24.     @JsonSubTypes.Type(name = "#Microsoft.Azure.Search.ClassicSimilarity", value = ClassicSimilarityAlgorithm.class),
  25.     @JsonSubTypes.Type(name = "#Microsoft.Azure.Search.BM25Similarity", value = BM25SimilarityAlgorithm.class)
  26. })
  27. @Immutable
  28. @JsonTypeName("Similarity")
  29. public abstract class SimilarityAlgorithm {}