Documents - Search Post

Searches for documents in the index.

POST {endpoint}/indexes('{indexName}')/docs/search.post.search?api-version=2023-10-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>.

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.

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, or to return partial results (default).

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'.

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

SearchError

Error response.

Examples

SearchIndexSearchDocumentsPost

Sample Request

POST https://myservice.search.windows.net/indexes('myindex')/docs/search.post.search?api-version=2023-10-01-Preview

{
  "count": true,
  "facets": [
    "category,count:10,sort:count"
  ],
  "filter": "rating gt 4.0",
  "highlight": "description",
  "highlightPostTag": "</em>",
  "highlightPreTag": "<em>",
  "minimumCoverage": null,
  "orderby": "rating desc",
  "queryType": "simple",
  "scoringParameters": [
    "currentLocation--122.123,44.77233"
  ],
  "scoringProfile": "sp",
  "search": "nice hotels",
  "searchFields": "category,description",
  "searchMode": "any",
  "sessionId": "mysessionid",
  "scoringStatistics": "global",
  "select": "hotelId,description",
  "skip": 0,
  "top": 10,
  "vectorQueries": [
    {
      "kind": "vector",
      "vector": [
        0.103,
        0.0712,
        0.0852,
        0.1547,
        0.1183
      ],
      "fields": "descriptionEmbedding",
      "k": 5,
      "exhaustive": true
    }
  ],
  "vectorFilterMode": "preFilter"
}

Sample Response

{
  "@odata.count": 25,
  "@search.facets": {
    "category": [
      {
        "count": 1,
        "value": "Economy"
      },
      {
        "count": 1,
        "value": "Luxury"
      }
    ]
  },
  "@search.nextPageParameters": {
    "count": true,
    "facets": [
      "category,count:10,sort:count"
    ],
    "filter": "rating gt 4.0",
    "highlight": "title",
    "highlightPostTag": "</em>",
    "highlightPreTag": "<em>",
    "minimumCoverage": null,
    "orderby": "search.score() desc,rating desc",
    "queryType": "simple",
    "sessionId": "mysessionid",
    "scoringStatistics": "global",
    "scoringParameters": [
      "currentLocation--122.123,44.77233"
    ],
    "scoringProfile": "sp",
    "search": "nice hotels",
    "searchFields": "title,description",
    "searchMode": "any",
    "select": "docId,title,description",
    "skip": 2,
    "top": 8
  },
  "value": [
    {
      "@search.score": 1.5,
      "@search.highlights": {
        "title": [
          "<em>Nice</em> <em>Hotel</em>"
        ]
      },
      "description": "Cheapest hotel in town",
      "docId": "1",
      "title": "Nice Hotel"
    },
    {
      "@search.score": 0.7,
      "@search.highlights": {
        "title": [
          "Fancy <em>Hotel</em>"
        ]
      },
      "description": "Best hotel in town",
      "docId": "2",
      "title": "Fancy Hotel"
    }
  ],
  "@odata.nextLink": "https://myservice.search.windows.net/indexes('myindex')/docs/search.post.search?api-version=2023-10-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'..

DocumentDebugInfo

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

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.

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

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.

SearchError

Describes an error condition for the API.

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.

SemanticDebugInfo
SemanticErrorMode

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

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)

SemanticSearchResultsType

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

VectorFilterMode

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

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.

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.

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.

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.

Name Type Description
disabled

string

No query debugging information will be returned.

semantic

string

Allows the user to further explore their reranked 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)

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.

k

integer

Number of nearest neighbors to return as top hits.

kind string:

vector

The kind of vector query being performed.

vector

number[]

The vector representation of a search query.

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.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.

value

SearchResult[]

The sequence of results returned by the query.

SearchError

Describes an error condition for the API.

Name Type Description
code

string

One of a server-defined set of error codes.

details

SearchError[]

An array of details about specific errors that led to this reported error.

message

string

A human-readable representation of the error.

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>.

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.

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, or to return partial results (default).

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'.

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.

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, or to return partial results (default).

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.

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.

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.

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.

k

integer

Number of nearest neighbors to return as top hits.

kind string:

text

The kind of vector query being performed.

text

string

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

VectorQueryKind

The kind of vector query being performed.

Name Type Description
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.