Class HybridSearch

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

public final class HybridSearch extends Object implements com.azure.json.JsonSerializable<HybridSearch>
TThe query parameters to configure hybrid search behaviors.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of HybridSearch class.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of HybridSearch from the JsonReader.
    Get the countAndFacetMode property: Determines whether the count and facets should includes all documents that matched the search query, or only the documents that are retrieved within the 'maxTextRecallSize' window.
    Get the maxTextRecallSize property: Determines the maximum number of documents to be retrieved by the text query portion of a hybrid search request.
    Set the countAndFacetMode property: Determines whether the count and facets should includes all documents that matched the search query, or only the documents that are retrieved within the 'maxTextRecallSize' window.
    setMaxTextRecallSize(Integer maxTextRecallSize)
    Set the maxTextRecallSize property: Determines the maximum number of documents to be retrieved by the text query portion of a hybrid search request.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • HybridSearch

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

    • getMaxTextRecallSize

      public Integer getMaxTextRecallSize()
      Get the maxTextRecallSize property: Determines the maximum number of documents to be retrieved by the text query portion of a hybrid search request. Those documents will be combined with the documents matching the vector queries to produce a single final list of results. Choosing a larger maxTextRecallSize value will allow retrieving and paging through more documents (using the top and skip parameters), at the cost of higher resource utilization and higher latency. The value needs to be between 1 and 10,000. Default is 1000.
      Returns:
      the maxTextRecallSize value.
    • setMaxTextRecallSize

      public HybridSearch setMaxTextRecallSize(Integer maxTextRecallSize)
      Set the maxTextRecallSize property: Determines the maximum number of documents to be retrieved by the text query portion of a hybrid search request. Those documents will be combined with the documents matching the vector queries to produce a single final list of results. Choosing a larger maxTextRecallSize value will allow retrieving and paging through more documents (using the top and skip parameters), at the cost of higher resource utilization and higher latency. The value needs to be between 1 and 10,000. Default is 1000.
      Parameters:
      maxTextRecallSize - the maxTextRecallSize value to set.
      Returns:
      the HybridSearch object itself.
    • getCountAndFacetMode

      public HybridCountAndFacetMode getCountAndFacetMode()
      Get the countAndFacetMode property: Determines whether the count and facets should includes all documents that matched the search query, or only the documents that are retrieved within the 'maxTextRecallSize' window.
      Returns:
      the countAndFacetMode value.
    • setCountAndFacetMode

      public HybridSearch setCountAndFacetMode(HybridCountAndFacetMode countAndFacetMode)
      Set the countAndFacetMode property: Determines whether the count and facets should includes all documents that matched the search query, or only the documents that are retrieved within the 'maxTextRecallSize' window.
      Parameters:
      countAndFacetMode - the countAndFacetMode value to set.
      Returns:
      the HybridSearch object itself.
    • toJson

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

      public static HybridSearch fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of HybridSearch from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of HybridSearch 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 HybridSearch.