Documents - Search Post

Searches for documents in the index.

POST {endpoint}/indexes('{indexName}')/docs/search.post.search?api-version=2024-11-01-preview

URI Parameters

Name In Required Type Description
endpoint
path True

string

The endpoint URL of the search service.

indexName
path True

string

The name of the index.

api-version
query True

string

Client Api Version.

Request Header

Name Required Type Description
x-ms-client-request-id

string

uuid

The tracking ID sent with the request to help with debugging.

Request Body

Name Type Description
answers

QueryAnswerType

A value that specifies whether answers should be returned as part of the search response.

captions

QueryCaptionType

A value that specifies whether captions should be returned as part of the search response.

count

boolean

A value that specifies whether to fetch the total count of results. Default is false. Setting this value to true may have a performance impact. Note that the count returned is an approximation.

debug

QueryDebugMode

Enables a debugging tool that can be used to further explore your reranked results.

facets

string[]

The list of facet expressions to apply to the search query. Each facet expression contains a field name, optionally followed by a comma-separated list of name:value pairs.

filter

string

The OData $filter expression to apply to the search query.

highlight

string

The comma-separated list of field names to use for hit highlights. Only searchable fields can be used for hit highlighting.

highlightPostTag

string

A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is </em>.

highlightPreTag

string

A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default is <em>.

hybridSearch

HybridSearch

The query parameters to configure hybrid search behaviors.

minimumCoverage

number

A number between 0 and 100 indicating the percentage of the index that must be covered by a search query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 100.

orderby

string

The comma-separated list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to either the geo.distance() or the search.score() functions. Each expression can be followed by asc to indicate ascending, or desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no $orderby is specified, the default sort order is descending by document match score. There can be at most 32 $orderby clauses.

queryLanguage

QueryLanguage

A value that specifies the language of the search query.

queryRewrites

QueryRewritesType

A value that specifies whether query rewrites should be generated to augment the search query.

queryType

QueryType

A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if your query uses the Lucene query syntax.

scoringParameters

string[]

The list of parameter values to be used in scoring functions (for example, referencePointParameter) using the format name-values. For example, if the scoring profile defines a function with a parameter called 'mylocation' the parameter string would be "mylocation--122.2,44.8" (without the quotes).

scoringProfile

string

The name of a scoring profile to evaluate match scores for matching documents in order to sort the results.

scoringStatistics

ScoringStatistics

A value that specifies whether we want to calculate scoring statistics (such as document frequency) globally for more consistent scoring, or locally, for lower latency. The default is 'local'. Use 'global' to aggregate scoring statistics globally before scoring. Using global scoring statistics can increase latency of search queries.

search

string

A full-text search query expression; Use "*" or omit this parameter to match all documents.

searchFields

string

The comma-separated list of field names to which to scope the full-text search. When using fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each fielded search expression take precedence over any field names listed in this parameter.

searchMode

SearchMode

A value that specifies whether any or all of the search terms must be matched in order to count the document as a match.

select

string

The comma-separated list of fields to retrieve. If unspecified, all fields marked as retrievable in the schema are included.

semanticConfiguration

string

The name of a semantic configuration that will be used when processing documents for queries of type semantic.

semanticErrorHandling

SemanticErrorMode

Allows the user to choose whether a semantic call should fail completely (default / current behavior), or to return partial results.

semanticFields

string

The comma-separated list of field names used for semantic ranking.

semanticMaxWaitInMilliseconds

integer

Allows the user to set an upper bound on the amount of time it takes for semantic enrichment to finish processing before the request fails.

semanticQuery

string

Allows setting a separate search query that will be solely used for semantic reranking, semantic captions and semantic answers. Is useful for scenarios where there is a need to use different queries between the base retrieval and ranking phase, and the L2 semantic phase.

sessionId

string

A value to be used to create a sticky session, which can help getting more consistent results. As long as the same sessionId is used, a best-effort attempt will be made to target the same replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the load balancing of the requests across replicas and adversely affect the performance of the search service. The value used as sessionId cannot start with a '_' character.

skip

integer

The number of search results to skip. This value cannot be greater than 100,000. If you need to scan documents in sequence, but cannot use skip due to this limitation, consider using orderby on a totally-ordered key and filter with a range query instead.

speller

QuerySpellerType

A value that specified the type of the speller to use to spell-correct individual search query terms.

top

integer

The number of search results to retrieve. This can be used in conjunction with $skip to implement client-side paging of search results. If results are truncated due to server-side paging, the response will include a continuation token that can be used to issue another Search request for the next page of results.

vectorFilterMode

VectorFilterMode

Determines whether or not filters are applied before or after the vector search is performed. Default is 'preFilter' for new indexes.

vectorQueries VectorQuery[]:

The query parameters for vector and hybrid search queries.

Responses

Name Type Description
200 OK

SearchDocumentsResult

Response containing documents that match the search criteria.

Other Status Codes

ErrorResponse

Error response.

Examples

SearchIndexSearchDocumentsPost
SearchIndexSearchDocumentsSemanticPost

SearchIndexSearchDocumentsPost

Sample request

POST https://previewexampleservice.search.windows.net/indexes('preview-test')/docs/search.post.search?api-version=2024-11-01-preview


{
  "count": true,
  "facets": [
    "ownerId"
  ],
  "filter": "category eq 'purple' or category eq 'pink'",
  "highlight": "category",
  "highlightPostTag": "</em>",
  "highlightPreTag": "</em>",
  "orderby": "id desc",
  "queryType": "simple",
  "scoringStatistics": "global",
  "sessionId": "mysessionid",
  "scoringParameters": [
    "categoryTag:desiredCategoryValue"
  ],
  "scoringProfile": "stringFieldBoost",
  "search": "purple",
  "searchFields": "id,name,description,category,ownerId",
  "searchMode": "any",
  "select": "id,name,description,category,ownerId",
  "skip": 0,
  "top": 10,
  "vectorQueries": [
    {
      "vector": [
        0,
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9
      ],
      "kind": "vector",
      "k": 50,
      "fields": "vector22, vector1b",
      "oversampling": 20,
      "weight": 1,
      "threshold": {
        "value": 0.984,
        "kind": "vectorSimilarity"
      },
      "filterOverride": "ownerId eq 'sam'"
    }
  ],
  "vectorFilterMode": "preFilter",
  "hybridSearch": {
    "maxTextRecallSize": 100,
    "countAndFacetMode": "countAllResults"
  }
}

Sample response

{
  "@odata.count": 27,
  "@search.facets": {
    "ownerId": [
      {
        "count": 16,
        "value": "sam"
      },
      {
        "count": 8,
        "value": "ryan"
      },
      {
        "count": 3,
        "value": "benny"
      }
    ]
  },
  "value": [
    {
      "@search.score": 1,
      "@search.highlights": {
        "category": [
          "</em>purple</em>"
        ]
      },
      "id": "no-vectors",
      "name": "test",
      "description": "no vector",
      "category": "purple",
      "ownerId": "sam"
    },
    {
      "@search.score": 1,
      "@search.highlights": {
        "category": [
          "</em>purple</em>"
        ]
      },
      "id": "empty-vectors",
      "name": "test",
      "description": "no vector",
      "category": "purple",
      "ownerId": "sam"
    },
    {
      "@search.score": 1,
      "@search.highlights": {
        "category": [
          "</em>purple</em>"
        ]
      },
      "id": "9",
      "name": "test",
      "description": "test9 hello",
      "category": "purple",
      "ownerId": "ryan"
    },
    {
      "@search.score": 1,
      "@search.highlights": {
        "category": [
          "</em>purple</em>"
        ]
      },
      "id": "8",
      "name": "test",
      "description": "test8 hello",
      "category": "purple",
      "ownerId": "sam"
    },
    {
      "@search.score": 1,
      "@search.highlights": {
        "category": [
          "</em>purple</em>"
        ]
      },
      "id": "7",
      "name": "test",
      "description": "test7 hello",
      "category": "purple",
      "ownerId": "sam"
    },
    {
      "@search.score": 1,
      "@search.highlights": {
        "category": [
          "</em>purple</em>"
        ]
      },
      "id": "6",
      "name": "test",
      "description": "test6 hello",
      "category": "purple",
      "ownerId": "ryan"
    },
    {
      "@search.score": 1,
      "@search.highlights": {
        "category": [
          "</em>purple</em>"
        ]
      },
      "id": "5",
      "name": "test",
      "description": "test5 hello",
      "category": "purple",
      "ownerId": "sam"
    },
    {
      "@search.score": 1,
      "@search.highlights": {
        "category": [
          "</em>purple</em>"
        ]
      },
      "id": "4",
      "name": "test",
      "description": "test4 hello",
      "category": "purple",
      "ownerId": "sam"
    },
    {
      "@search.score": 1,
      "@search.highlights": {
        "category": [
          "</em>purple</em>"
        ]
      },
      "id": "3",
      "name": "test",
      "description": "test3 hello",
      "category": "purple",
      "ownerId": "ryan"
    },
    {
      "@search.score": 1,
      "@search.highlights": {
        "category": [
          "</em>purple</em>"
        ]
      },
      "id": "24",
      "name": "test",
      "description": "test24 hello",
      "category": "purple",
      "ownerId": "ryan"
    }
  ]
}

SearchIndexSearchDocumentsSemanticPost

Sample request

POST https://myservice.search.windows.net/indexes('myindex')/docs/search.post.search?api-version=2024-11-01-preview

{
  "count": true,
  "highlightPostTag": "</em>",
  "highlightPreTag": "<em>",
  "queryType": "semantic",
  "search": "how do clouds form",
  "semanticConfiguration": "my-semantic-config",
  "answers": "extractive|count-3",
  "captions": "extractive|highlight-true",
  "semanticErrorHandling": "partial",
  "semanticMaxWaitInMilliseconds": 780
}

Sample response

{
  "@odata.count": 25,
  "@search.answers": [
    {
      "key": "4123",
      "text": "Sunlight heats the land all day, warming that moist air and causing it to rise high into the   atmosphere until it cools and condenses into water droplets. Clouds generally form where air is ascending (over land in this case),   but not where it is descending (over the river).",
      "highlights": "Sunlight heats the land all day, warming that moist air and causing it to rise high into the   atmosphere until it cools and condenses into water droplets. Clouds generally form<em> where air is ascending</em> (over land in this case),   but not where it is<em> descending</em> (over the river).",
      "score": 0.94639826
    }
  ],
  "@search.nextPageParameters": {
    "count": true,
    "highlightPostTag": "</em>",
    "highlightPreTag": "<em>",
    "queryType": "semantic",
    "search": "how do clouds form",
    "semanticConfiguration": "my-semantic-config",
    "answers": "extractive|count-3",
    "captions": "extractive|highlight-true",
    "semanticErrorHandling": "partial",
    "semanticMaxWaitInMilliseconds": 780,
    "skip": 2,
    "top": 8
  },
  "value": [
    {
      "@search.score": 0.5479723,
      "@search.rerankerScore": 1.0321671911515296,
      "@search.captions": [
        {
          "text": "Like all clouds, it forms when the air reaches its dew point—the temperature at which an air mass is cool enough for its water vapor to condense into liquid droplets. This false-color image shows valley fog, which is common in the Pacific Northwest of North America.",
          "highlights": "Like all<em> clouds</em>, it<em> forms</em> when the air reaches its dew point—the temperature at    which an air mass is cool enough for its water vapor to condense into liquid droplets. This false-color image shows valley<em> fog</em>, which is common in the Pacific Northwest of North America."
        }
      ],
      "id": "4123",
      "title": "Earth Atmosphere",
      "content": "Fog is essentially a cloud lying on the ground. Like all clouds, it forms when the air reaches its dew point—the temperature at  \n\nwhich an air mass is cool enough for its water vapor to condense into liquid droplets.\n\nThis false-color image shows valley fog, which is common in the Pacific Northwest of North America. On clear winter nights, the \n\nground and overlying air cool off rapidly, especially at high elevations. Cold air is denser than warm air, and it sinks down into the \n\nvalleys. The moist air in the valleys gets chilled to its dew point, and fog forms. If undisturbed by winds, such fog may persist for \n\ndays. The Terra satellite captured this image of foggy valleys northeast of Vancouver in February 2010.\n\n\n",
      "locations": [
        "Pacific Northwest",
        "North America",
        "Vancouver"
      ]
    }
  ],
  "@odata.nextLink": "https://myservice.search.windows.net/indexes('myindex')/docs/search.post.search?api-version=2024-11-01-preview"
}

Definitions

Name Description
AnswerResult

An answer is a text passage extracted from the contents of the most relevant documents that matched the query. Answers are extracted from the top search results. Answer candidates are scored and the top answers are selected.

CaptionResult

Captions are the most representative passages from the document relatively to the search query. They are often used as document summary. Captions are only returned for queries of type semantic.

DebugInfo

Contains debugging information that can be used to further explore your search results.

DocumentDebugInfo

Contains debugging information that can be used to further explore your search results.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

HybridCountAndFacetMode

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. The default value is 'countAllResults'.

HybridSearch

TThe query parameters to configure hybrid search behaviors.

QueryAnswerType

A value that specifies whether answers should be returned as part of the search response.

QueryCaptionType

A value that specifies whether captions should be returned as part of the search response.

QueryDebugMode

Enables a debugging tool that can be used to further explore your search results. You can enable multiple debug modes simultaneously by separating them with a | character, for example: semantic|queryRewrites.

QueryLanguage

The language of the query.

QueryResultDocumentRerankerInput

The raw concatenated strings that were sent to the semantic enrichment process.

QueryResultDocumentSemanticField

Description of fields that were sent to the semantic enrichment process, as well as how they were used

QueryResultDocumentSubscores

The breakdown of subscores between the text and vector query components of the search query for this document. Each vector query is shown as a separate object in the same order they were received.

QueryRewritesDebugInfo

Contains debugging information specific to query rewrites.

QueryRewritesType

A value that specifies whether query rewrites should be generated to augment the search query.

QueryRewritesValuesDebugInfo

Contains debugging information specific to query rewrites.

QuerySpellerType

A value that specified the type of the speller to use to spell-correct individual search query terms.

QueryType

Specifies the syntax of the search query. The default is 'simple'. Use 'full' if your query uses the Lucene query syntax and 'semantic' if query syntax is not needed.

RawVectorQuery

The query parameters to use for vector search when a raw vector value is provided.

ScoringStatistics

A value that specifies whether we want to calculate scoring statistics (such as document frequency) globally for more consistent scoring, or locally, for lower latency. The default is 'local'. Use 'global' to aggregate scoring statistics globally before scoring. Using global scoring statistics can increase latency of search queries.

SearchDocumentsResult

Response containing search results from an index.

SearchMode

Specifies whether any or all of the search terms must be matched in order to count the document as a match.

SearchRequest

Parameters for filtering, sorting, faceting, paging, and other search query behaviors.

SearchResult

Contains a document found by a search query, plus associated metadata.

SearchScoreThreshold

The results of the vector query will filter based on the '@search.score' value. Note this is the @search.score returned as part of the search response. The threshold direction will be chosen for higher @search.score.

SemanticDebugInfo
SemanticErrorMode

Allows the user to choose whether a semantic call should fail completely (default / current behavior), or to return partial results.

SemanticErrorReason

Reason that a partial response was returned for a semantic ranking request.

SemanticFieldState

The way the field was used for the semantic enrichment process (fully used, partially used, or unused)

SemanticQueryRewritesResultType

Type of query rewrite that was used for this request.

SemanticSearchResultsType

Type of partial response that was returned for a semantic ranking request.

SingleVectorFieldResult

A single vector field result. Both @search.score and vector similarity values are returned. Vector similarity is related to @search.score by an equation.

TextResult

The BM25 or Classic score for the text portion of the query.

VectorFilterMode

Determines whether or not filters are applied before or after the vector search is performed.

VectorizableImageBinaryQuery

The query parameters to use for vector search when a base 64 encoded binary of an image that needs to be vectorized is provided.

VectorizableImageUrlQuery

The query parameters to use for vector search when an url that represents an image value that needs to be vectorized is provided.

VectorizableTextQuery

The query parameters to use for vector search when a text value that needs to be vectorized is provided.

VectorQueryKind

The kind of vector query being performed.

VectorsDebugInfo
VectorSimilarityThreshold

The results of the vector query will be filtered based on the vector similarity metric. Note this is the canonical definition of similarity metric, not the 'distance' version. The threshold direction (larger or smaller) will be chosen automatically according to the metric used by the field.

VectorThresholdKind

The kind of vector query being performed.

AnswerResult

An answer is a text passage extracted from the contents of the most relevant documents that matched the query. Answers are extracted from the top search results. Answer candidates are scored and the top answers are selected.

Name Type Description
highlights

string

Same text passage as in the Text property with highlighted text phrases most relevant to the query.

key

string

The key of the document the answer was extracted from.

score

number

The score value represents how relevant the answer is to the query relative to other answers returned for the query.

text

string

The text passage extracted from the document contents as the answer.

CaptionResult

Captions are the most representative passages from the document relatively to the search query. They are often used as document summary. Captions are only returned for queries of type semantic.

Name Type Description
highlights

string

Same text passage as in the Text property with highlighted phrases most relevant to the query.

text

string

A representative text passage extracted from the document most relevant to the search query.

DebugInfo

Contains debugging information that can be used to further explore your search results.

Name Type Description
queryRewrites

QueryRewritesDebugInfo

Contains debugging information specific to query rewrites.

DocumentDebugInfo

Contains debugging information that can be used to further explore your search results.

Name Type Description
semantic

SemanticDebugInfo

Contains debugging information specific to semantic ranking requests.

vectors

VectorsDebugInfo

Contains debugging information specific to vector and hybrid search.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

HybridCountAndFacetMode

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. The default value is 'countAllResults'.

Name Type Description
countAllResults

string

Include all documents that were matched by the search query when computing 'count' and 'facets', regardless of whether or not those documents are within the 'maxTextRecallSize' retrieval window.

countRetrievableResults

string

Only include documents that were matched within the 'maxTextRecallSize' retrieval window when computing 'count' and 'facets'.

HybridSearch

TThe query parameters to configure hybrid search behaviors.

Name Type Description
countAndFacetMode

HybridCountAndFacetMode

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.

maxTextRecallSize

integer

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.

QueryAnswerType

A value that specifies whether answers should be returned as part of the search response.

Name Type Description
extractive

string

Extracts answer candidates from the contents of the documents returned in response to a query expressed as a question in natural language.

none

string

Do not return answers for the query.

QueryCaptionType

A value that specifies whether captions should be returned as part of the search response.

Name Type Description
extractive

string

Extracts captions from the matching documents that contain passages relevant to the search query.

none

string

Do not return captions for the query.

QueryDebugMode

Enables a debugging tool that can be used to further explore your search results. You can enable multiple debug modes simultaneously by separating them with a | character, for example: semantic|queryRewrites.

Name Type Description
all

string

Turn on all debug options.

disabled

string

No query debugging information will be returned.

queryRewrites

string

Allows the user to explore the list of query rewrites generated for their search request.

semantic

string

Allows the user to further explore their reranked results.

vector

string

Allows the user to further explore their hybrid and vector query results.

QueryLanguage

The language of the query.

Name Type Description
ar-eg

string

Query language value for Arabic (Egypt).

ar-jo

string

Query language value for Arabic (Jordan).

ar-kw

string

Query language value for Arabic (Kuwait).

ar-ma

string

Query language value for Arabic (Morocco).

ar-sa

string

Query language value for Arabic (Saudi Arabia).

bg-bg

string

Query language value for Bulgarian (Bulgaria).

bn-in

string

Query language value for Bengali (India).

ca-es

string

Query language value for Catalan.

cs-cz

string

Query language value for Czech (Czech Republic).

da-dk

string

Query language value for Danish (Denmark).

de-de

string

Query language value for German (Germany).

el-gr

string

Query language value for Greek (Greece).

en-au

string

Query language value for English (Australia).

en-ca

string

Query language value for English (Canada).

en-gb

string

Query language value for English (Great Britain).

en-in

string

Query language value for English (India).

en-us

string

Query language value for English (United States).

es-es

string

Query language value for Spanish (Spain).

es-mx

string

Query language value for Spanish (Mexico).

et-ee

string

Query language value for Estonian (Estonia).

eu-es

string

Query language value for Basque.

fa-ae

string

Query language value for Persian (U.A.E.).

fi-fi

string

Query language value for Finnish (Finland).

fr-ca

string

Query language value for French (Canada).

fr-fr

string

Query language value for French (France).

ga-ie

string

Query language value for Irish (Ireland).

gl-es

string

Query language value for Galician.

gu-in

string

Query language value for Gujarati (India).

he-il

string

Query language value for Hebrew (Israel).

hi-in

string

Query language value for Hindi (India).

hr-ba

string

Query language value for Croatian (Bosnia and Herzegovina).

hr-hr

string

Query language value for Croatian (Croatia).

hu-hu

string

Query language value for Hungarian (Hungary).

hy-am

string

Query language value for Armenian (Armenia).

id-id

string

Query language value for Indonesian (Indonesia).

is-is

string

Query language value for Icelandic (Iceland).

it-it

string

Query language value for Italian (Italy).

ja-jp

string

Query language value for Japanese (Japan).

kn-in

string

Query language value for Kannada (India).

ko-kr

string

Query language value for Korean (Korea).

lt-lt

string

Query language value for Lithuanian (Lithuania).

lv-lv

string

Query language value for Latvian (Latvia).

ml-in

string

Query language value for Malayalam (India).

mr-in

string

Query language value for Marathi (India).

ms-bn

string

Query language value for Malay (Brunei Darussalam).

ms-my

string

Query language value for Malay (Malaysia).

nb-no

string

Query language value for Norwegian (Norway).

nl-be

string

Query language value for Dutch (Belgium).

nl-nl

string

Query language value for Dutch (Netherlands).

no-no

string

Query language value for Norwegian (Norway).

none

string

Query language not specified.

pa-in

string

Query language value for Punjabi (India).

pl-pl

string

Query language value for Polish (Poland).

pt-br

string

Query language value for Portuguese (Brazil).

pt-pt

string

Query language value for Portuguese (Portugal).

ro-ro

string

Query language value for Romanian (Romania).

ru-ru

string

Query language value for Russian (Russia).

sk-sk

string

Query language value for Slovak (Slovakia).

sl-sl

string

Query language value for Slovenian (Slovenia).

sr-ba

string

Query language value for Serbian (Bosnia and Herzegovina).

sr-me

string

Query language value for Serbian (Montenegro).

sr-rs

string

Query language value for Serbian (Serbia).

sv-se

string

Query language value for Swedish (Sweden).

ta-in

string

Query language value for Tamil (India).

te-in

string

Query language value for Telugu (India).

th-th

string

Query language value for Thai (Thailand).

tr-tr

string

Query language value for Turkish (Turkey).

uk-ua

string

Query language value for Ukrainian (Ukraine).

ur-pk

string

Query language value for Urdu (Pakistan).

vi-vn

string

Query language value for Vietnamese (Viet Nam).

zh-cn

string

Query language value for Chinese (China).

zh-tw

string

Query language value for Chinese (Taiwan).

QueryResultDocumentRerankerInput

The raw concatenated strings that were sent to the semantic enrichment process.

Name Type Description
content

string

The raw concatenated strings for the content fields that were used for semantic enrichment.

keywords

string

The raw concatenated strings for the keyword fields that were used for semantic enrichment.

title

string

The raw string for the title field that was used for semantic enrichment.

QueryResultDocumentSemanticField

Description of fields that were sent to the semantic enrichment process, as well as how they were used

Name Type Description
name

string

The name of the field that was sent to the semantic enrichment process

state

SemanticFieldState

The way the field was used for the semantic enrichment process (fully used, partially used, or unused)

QueryResultDocumentSubscores

The breakdown of subscores between the text and vector query components of the search query for this document. Each vector query is shown as a separate object in the same order they were received.

Name Type Description
documentBoost

number

The BM25 or Classic score for the text portion of the query.

text

TextResult

The BM25 or Classic score for the text portion of the query.

vectors

<string,  SingleVectorFieldResult>

The vector similarity and @search.score values for each vector query.

QueryRewritesDebugInfo

Contains debugging information specific to query rewrites.

Name Type Description
text

QueryRewritesValuesDebugInfo

List of query rewrites generated for the text query.

vectors

QueryRewritesValuesDebugInfo[]

List of query rewrites generated for the vectorizable text queries.

QueryRewritesType

A value that specifies whether query rewrites should be generated to augment the search query.

Name Type Description
generative

string

Generate alternative query terms to increase the recall of a search request.

none

string

Do not generate additional query rewrites for this query.

QueryRewritesValuesDebugInfo

Contains debugging information specific to query rewrites.

Name Type Description
inputQuery

string

The input text to the generative query rewriting model. There may be cases where the user query and the input to the generative model are not identical.

rewrites

string[]

List of query rewrites.

QuerySpellerType

A value that specified the type of the speller to use to spell-correct individual search query terms.

Name Type Description
lexicon

string

Speller corrects individual query terms using a static lexicon for the language specified by the queryLanguage parameter.

none

string

Speller not enabled.

QueryType

Specifies the syntax of the search query. The default is 'simple'. Use 'full' if your query uses the Lucene query syntax and 'semantic' if query syntax is not needed.

Name Type Description
full

string

Uses the full Lucene query syntax for searches. Search text is interpreted using the Lucene query language which allows field-specific and weighted searches, as well as other advanced features.

semantic

string

Best suited for queries expressed in natural language as opposed to keywords. Improves precision of search results by re-ranking the top search results using a ranking model trained on the Web corpus.

simple

string

Uses the simple query syntax for searches. Search text is interpreted using a simple query language that allows for symbols such as +, * and "". Queries are evaluated across all searchable fields by default, unless the searchFields parameter is specified.

RawVectorQuery

The query parameters to use for vector search when a raw vector value is provided.

Name Type Description
exhaustive

boolean

When true, triggers an exhaustive k-nearest neighbor search across all vectors within the vector index. Useful for scenarios where exact matches are critical, such as determining ground truth values.

fields

string

Vector Fields of type Collection(Edm.Single) to be included in the vector searched.

filterOverride

string

The OData filter expression to apply to this specific vector query. If no filter expression is defined at the vector level, the expression defined in the top level filter parameter is used instead.

k

integer

Number of nearest neighbors to return as top hits.

kind string:

vector

The kind of vector query being performed.

oversampling

number

Oversampling factor. Minimum value is 1. It overrides the 'defaultOversampling' parameter configured in the index definition. It can be set only when 'rerankWithOriginalVectors' is true. This parameter is only permitted when a compression method is used on the underlying vector field.

threshold VectorThreshold:

The threshold used for vector queries. Note this can only be set if all 'fields' use the same similarity metric.

vector

number[]

The vector representation of a search query.

weight

number

Relative weight of the vector query when compared to other vector query and/or the text query within the same search request. This value is used when combining the results of multiple ranking lists produced by the different vector queries and/or the results retrieved through the text query. The higher the weight, the higher the documents that matched that query will be in the final ranking. Default is 1.0 and the value needs to be a positive number larger than zero.

ScoringStatistics

A value that specifies whether we want to calculate scoring statistics (such as document frequency) globally for more consistent scoring, or locally, for lower latency. The default is 'local'. Use 'global' to aggregate scoring statistics globally before scoring. Using global scoring statistics can increase latency of search queries.

Name Type Description
global

string

The scoring statistics will be calculated globally for more consistent scoring.

local

string

The scoring statistics will be calculated locally for lower latency.

SearchDocumentsResult

Response containing search results from an index.

Name Type Description
@odata.count

integer

The total count of results found by the search operation, or null if the count was not requested. If present, the count may be greater than the number of results in this response. This can happen if you use the $top or $skip parameters, or if the query can't return all the requested documents in a single response.

@odata.nextLink

string

Continuation URL returned when the query can't return all the requested results in a single response. You can use this URL to formulate another GET or POST Search request to get the next part of the search response. Make sure to use the same verb (GET or POST) as the request that produced this response.

@search.answers

AnswerResult[]

The answers query results for the search operation; null if the answers query parameter was not specified or set to 'none'.

@search.coverage

number

A value indicating the percentage of the index that was included in the query, or null if minimumCoverage was not specified in the request.

@search.debug

DebugInfo

Debug information that applies to the search results as a whole.

@search.facets

object

The facet query results for the search operation, organized as a collection of buckets for each faceted field; null if the query did not include any facet expressions.

@search.nextPageParameters

SearchRequest

Continuation JSON payload returned when the query can't return all the requested results in a single response. You can use this JSON along with @odata.nextLink to formulate another POST Search request to get the next part of the search response.

@search.semanticPartialResponseReason

SemanticErrorReason

Reason that a partial response was returned for a semantic ranking request.

@search.semanticPartialResponseType

SemanticSearchResultsType

Type of partial response that was returned for a semantic ranking request.

@search.semanticQueryRewritesResultType

SemanticQueryRewritesResultType

Type of query rewrite that was used to retrieve documents.

value

SearchResult[]

The sequence of results returned by the query.

SearchMode

Specifies whether any or all of the search terms must be matched in order to count the document as a match.

Name Type Description
all

string

All of the search terms must be matched in order to count the document as a match.

any

string

Any of the search terms must be matched in order to count the document as a match.

SearchRequest

Parameters for filtering, sorting, faceting, paging, and other search query behaviors.

Name Type Description
answers

QueryAnswerType

A value that specifies whether answers should be returned as part of the search response.

captions

QueryCaptionType

A value that specifies whether captions should be returned as part of the search response.

count

boolean

A value that specifies whether to fetch the total count of results. Default is false. Setting this value to true may have a performance impact. Note that the count returned is an approximation.

debug

QueryDebugMode

Enables a debugging tool that can be used to further explore your reranked results.

facets

string[]

The list of facet expressions to apply to the search query. Each facet expression contains a field name, optionally followed by a comma-separated list of name:value pairs.

filter

string

The OData $filter expression to apply to the search query.

highlight

string

The comma-separated list of field names to use for hit highlights. Only searchable fields can be used for hit highlighting.

highlightPostTag

string

A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is </em>.

highlightPreTag

string

A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default is <em>.

hybridSearch

HybridSearch

The query parameters to configure hybrid search behaviors.

minimumCoverage

number

A number between 0 and 100 indicating the percentage of the index that must be covered by a search query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 100.

orderby

string

The comma-separated list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to either the geo.distance() or the search.score() functions. Each expression can be followed by asc to indicate ascending, or desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no $orderby is specified, the default sort order is descending by document match score. There can be at most 32 $orderby clauses.

queryLanguage

QueryLanguage

A value that specifies the language of the search query.

queryRewrites

QueryRewritesType

A value that specifies whether query rewrites should be generated to augment the search query.

queryType

QueryType

A value that specifies the syntax of the search query. The default is 'simple'. Use 'full' if your query uses the Lucene query syntax.

scoringParameters

string[]

The list of parameter values to be used in scoring functions (for example, referencePointParameter) using the format name-values. For example, if the scoring profile defines a function with a parameter called 'mylocation' the parameter string would be "mylocation--122.2,44.8" (without the quotes).

scoringProfile

string

The name of a scoring profile to evaluate match scores for matching documents in order to sort the results.

scoringStatistics

ScoringStatistics

A value that specifies whether we want to calculate scoring statistics (such as document frequency) globally for more consistent scoring, or locally, for lower latency. The default is 'local'. Use 'global' to aggregate scoring statistics globally before scoring. Using global scoring statistics can increase latency of search queries.

search

string

A full-text search query expression; Use "*" or omit this parameter to match all documents.

searchFields

string

The comma-separated list of field names to which to scope the full-text search. When using fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each fielded search expression take precedence over any field names listed in this parameter.

searchMode

SearchMode

A value that specifies whether any or all of the search terms must be matched in order to count the document as a match.

select

string

The comma-separated list of fields to retrieve. If unspecified, all fields marked as retrievable in the schema are included.

semanticConfiguration

string

The name of a semantic configuration that will be used when processing documents for queries of type semantic.

semanticErrorHandling

SemanticErrorMode

Allows the user to choose whether a semantic call should fail completely (default / current behavior), or to return partial results.

semanticFields

string

The comma-separated list of field names used for semantic ranking.

semanticMaxWaitInMilliseconds

integer

Allows the user to set an upper bound on the amount of time it takes for semantic enrichment to finish processing before the request fails.

semanticQuery

string

Allows setting a separate search query that will be solely used for semantic reranking, semantic captions and semantic answers. Is useful for scenarios where there is a need to use different queries between the base retrieval and ranking phase, and the L2 semantic phase.

sessionId

string

A value to be used to create a sticky session, which can help getting more consistent results. As long as the same sessionId is used, a best-effort attempt will be made to target the same replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the load balancing of the requests across replicas and adversely affect the performance of the search service. The value used as sessionId cannot start with a '_' character.

skip

integer

The number of search results to skip. This value cannot be greater than 100,000. If you need to scan documents in sequence, but cannot use skip due to this limitation, consider using orderby on a totally-ordered key and filter with a range query instead.

speller

QuerySpellerType

A value that specified the type of the speller to use to spell-correct individual search query terms.

top

integer

The number of search results to retrieve. This can be used in conjunction with $skip to implement client-side paging of search results. If results are truncated due to server-side paging, the response will include a continuation token that can be used to issue another Search request for the next page of results.

vectorFilterMode

VectorFilterMode

Determines whether or not filters are applied before or after the vector search is performed. Default is 'preFilter' for new indexes.

vectorQueries VectorQuery[]:

The query parameters for vector and hybrid search queries.

SearchResult

Contains a document found by a search query, plus associated metadata.

Name Type Description
@search.captions

CaptionResult[]

Captions are the most representative passages from the document relatively to the search query. They are often used as document summary. Captions are only returned for queries of type 'semantic'.

@search.documentDebugInfo

DocumentDebugInfo[]

Contains debugging information that can be used to further explore your search results.

@search.highlights

object

Text fragments from the document that indicate the matching search terms, organized by each applicable field; null if hit highlighting was not enabled for the query.

@search.rerankerScore

number

The relevance score computed by the semantic ranker for the top search results. Search results are sorted by the RerankerScore first and then by the Score. RerankerScore is only returned for queries of type 'semantic'.

@search.score

number

The relevance score of the document compared to other documents returned by the query.

SearchScoreThreshold

The results of the vector query will filter based on the '@search.score' value. Note this is the @search.score returned as part of the search response. The threshold direction will be chosen for higher @search.score.

Name Type Description
kind string:

searchScore

The kind of threshold used to filter vector queries

value

number

The threshold will filter based on the '@search.score' value. Note this is the @search.score returned as part of the search response. The threshold direction will be chosen for higher @search.score.

SemanticDebugInfo

Name Type Description
contentFields

QueryResultDocumentSemanticField[]

The content fields that were sent to the semantic enrichment process, as well as how they were used

keywordFields

QueryResultDocumentSemanticField[]

The keyword fields that were sent to the semantic enrichment process, as well as how they were used

rerankerInput

QueryResultDocumentRerankerInput

The raw concatenated strings that were sent to the semantic enrichment process.

titleField

QueryResultDocumentSemanticField

The title field that was sent to the semantic enrichment process, as well as how it was used

SemanticErrorMode

Allows the user to choose whether a semantic call should fail completely (default / current behavior), or to return partial results.

Name Type Description
fail

string

If there is an exception during the semantic processing step, the query will fail and return the appropriate HTTP code depending on the error.

partial

string

If the semantic processing fails, partial results still return. The definition of partial results depends on what semantic step failed and what was the reason for failure.

SemanticErrorReason

Reason that a partial response was returned for a semantic ranking request.

Name Type Description
capacityOverloaded

string

The request was throttled. Only the base results were returned.

maxWaitExceeded

string

If semanticMaxWaitInMilliseconds was set and the semantic processing duration exceeded that value. Only the base results were returned.

transient

string

At least one step of the semantic process failed.

SemanticFieldState

The way the field was used for the semantic enrichment process (fully used, partially used, or unused)

Name Type Description
partial

string

The field was partially used for semantic enrichment.

unused

string

The field was not used for semantic enrichment.

used

string

The field was fully used for semantic enrichment.

SemanticQueryRewritesResultType

Type of query rewrite that was used for this request.

Name Type Description
originalQueryOnly

string

Query rewrites were not successfully generated for this request. Only the original query was used to retrieve the results.

SemanticSearchResultsType

Type of partial response that was returned for a semantic ranking request.

Name Type Description
baseResults

string

Results without any semantic enrichment or reranking.

rerankedResults

string

Results have been reranked with the reranker model and will include semantic captions. They will not include any answers, answers highlights or caption highlights.

SingleVectorFieldResult

A single vector field result. Both @search.score and vector similarity values are returned. Vector similarity is related to @search.score by an equation.

Name Type Description
searchScore

number

The @search.score value that is calculated from the vector similarity score. This is the score that's visible in a pure single-field single-vector query.

vectorSimilarity

number

The vector similarity score for this document. Note this is the canonical definition of similarity metric, not the 'distance' version. For example, cosine similarity instead of cosine distance.

TextResult

The BM25 or Classic score for the text portion of the query.

Name Type Description
searchScore

number

The BM25 or Classic score for the text portion of the query.

VectorFilterMode

Determines whether or not filters are applied before or after the vector search is performed.

Name Type Description
postFilter

string

The filter will be applied after the candidate set of vector results is returned. Depending on the filter selectivity, this can result in fewer results than requested by the parameter 'k'.

preFilter

string

The filter will be applied before the search query.

VectorizableImageBinaryQuery

The query parameters to use for vector search when a base 64 encoded binary of an image that needs to be vectorized is provided.

Name Type Description
base64Image

string

The base 64 encoded binary of an image to be vectorized to perform a vector search query.

exhaustive

boolean

When true, triggers an exhaustive k-nearest neighbor search across all vectors within the vector index. Useful for scenarios where exact matches are critical, such as determining ground truth values.

fields

string

Vector Fields of type Collection(Edm.Single) to be included in the vector searched.

filterOverride

string

The OData filter expression to apply to this specific vector query. If no filter expression is defined at the vector level, the expression defined in the top level filter parameter is used instead.

k

integer

Number of nearest neighbors to return as top hits.

kind string:

imageBinary

The kind of vector query being performed.

oversampling

number

Oversampling factor. Minimum value is 1. It overrides the 'defaultOversampling' parameter configured in the index definition. It can be set only when 'rerankWithOriginalVectors' is true. This parameter is only permitted when a compression method is used on the underlying vector field.

threshold VectorThreshold:

The threshold used for vector queries. Note this can only be set if all 'fields' use the same similarity metric.

weight

number

Relative weight of the vector query when compared to other vector query and/or the text query within the same search request. This value is used when combining the results of multiple ranking lists produced by the different vector queries and/or the results retrieved through the text query. The higher the weight, the higher the documents that matched that query will be in the final ranking. Default is 1.0 and the value needs to be a positive number larger than zero.

VectorizableImageUrlQuery

The query parameters to use for vector search when an url that represents an image value that needs to be vectorized is provided.

Name Type Description
exhaustive

boolean

When true, triggers an exhaustive k-nearest neighbor search across all vectors within the vector index. Useful for scenarios where exact matches are critical, such as determining ground truth values.

fields

string

Vector Fields of type Collection(Edm.Single) to be included in the vector searched.

filterOverride

string

The OData filter expression to apply to this specific vector query. If no filter expression is defined at the vector level, the expression defined in the top level filter parameter is used instead.

k

integer

Number of nearest neighbors to return as top hits.

kind string:

imageUrl

The kind of vector query being performed.

oversampling

number

Oversampling factor. Minimum value is 1. It overrides the 'defaultOversampling' parameter configured in the index definition. It can be set only when 'rerankWithOriginalVectors' is true. This parameter is only permitted when a compression method is used on the underlying vector field.

threshold VectorThreshold:

The threshold used for vector queries. Note this can only be set if all 'fields' use the same similarity metric.

url

string

The URL of an image to be vectorized to perform a vector search query.

weight

number

Relative weight of the vector query when compared to other vector query and/or the text query within the same search request. This value is used when combining the results of multiple ranking lists produced by the different vector queries and/or the results retrieved through the text query. The higher the weight, the higher the documents that matched that query will be in the final ranking. Default is 1.0 and the value needs to be a positive number larger than zero.

VectorizableTextQuery

The query parameters to use for vector search when a text value that needs to be vectorized is provided.

Name Type Description
exhaustive

boolean

When true, triggers an exhaustive k-nearest neighbor search across all vectors within the vector index. Useful for scenarios where exact matches are critical, such as determining ground truth values.

fields

string

Vector Fields of type Collection(Edm.Single) to be included in the vector searched.

filterOverride

string

The OData filter expression to apply to this specific vector query. If no filter expression is defined at the vector level, the expression defined in the top level filter parameter is used instead.

k

integer

Number of nearest neighbors to return as top hits.

kind string:

text

The kind of vector query being performed.

oversampling

number

Oversampling factor. Minimum value is 1. It overrides the 'defaultOversampling' parameter configured in the index definition. It can be set only when 'rerankWithOriginalVectors' is true. This parameter is only permitted when a compression method is used on the underlying vector field.

queryRewrites

QueryRewritesType

Can be configured to let a generative model rewrite the query before sending it to be vectorized.

text

string

The text to be vectorized to perform a vector search query.

threshold VectorThreshold:

The threshold used for vector queries. Note this can only be set if all 'fields' use the same similarity metric.

weight

number

Relative weight of the vector query when compared to other vector query and/or the text query within the same search request. This value is used when combining the results of multiple ranking lists produced by the different vector queries and/or the results retrieved through the text query. The higher the weight, the higher the documents that matched that query will be in the final ranking. Default is 1.0 and the value needs to be a positive number larger than zero.

VectorQueryKind

The kind of vector query being performed.

Name Type Description
imageBinary

string

Vector query where a base 64 encoded binary of an image that needs to be vectorized is provided.

imageUrl

string

Vector query where an url that represents an image value that needs to be vectorized is provided.

text

string

Vector query where a text value that needs to be vectorized is provided.

vector

string

Vector query where a raw vector value is provided.

VectorsDebugInfo

Name Type Description
subscores

QueryResultDocumentSubscores

The breakdown of subscores of the document prior to the chosen result set fusion/combination method such as RRF.

VectorSimilarityThreshold

The results of the vector query will be filtered based on the vector similarity metric. Note this is the canonical definition of similarity metric, not the 'distance' version. The threshold direction (larger or smaller) will be chosen automatically according to the metric used by the field.

Name Type Description
kind string:

vectorSimilarity

The kind of threshold used to filter vector queries

value

number

The threshold will filter based on the similarity metric value. Note this is the canonical definition of similarity metric, not the 'distance' version. The threshold direction (larger or smaller) will be chosen automatically according to the metric used by the field.

VectorThresholdKind

The kind of vector query being performed.

Name Type Description
searchScore

string

The results of the vector query will filter based on the '@search.score' value. Note this is the @search.score returned as part of the search response. The threshold direction will be chosen for higher @search.score.

vectorSimilarity

string

The results of the vector query will be filtered based on the vector similarity metric. Note this is the canonical definition of similarity metric, not the 'distance' version. The threshold direction (larger or smaller) will be chosen automatically according to the metric used by the field.