Documents - Search Get

Searches for documents in the index.

GET {endpoint}/indexes('{indexName}')/docs?api-version=2024-05-01-preview
GET {endpoint}/indexes('{indexName}')/docs?search={search}&$count={$count}&facet={facet}&$filter={$filter}&highlight={highlight}&highlightPostTag={highlightPostTag}&highlightPreTag={highlightPreTag}&minimumCoverage={minimumCoverage}&$orderby={$orderby}&queryType={queryType}&scoringParameter={scoringParameter}&scoringProfile={scoringProfile}&searchFields={searchFields}&searchMode={searchMode}&scoringStatistics={scoringStatistics}&sessionId={sessionId}&$select={$select}&$skip={$skip}&$top={$top}&api-version=2024-05-01-preview&semanticConfiguration={semanticConfiguration}&semanticErrorHandling={semanticErrorHandling}&semanticMaxWaitInMilliseconds={semanticMaxWaitInMilliseconds}&answers={answers}&captions={captions}&semanticQuery={semanticQuery}&debug={debug}&queryLanguage={queryLanguage}&speller={speller}&semanticFields={semanticFields}

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.

$count
query

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.

$filter
query

string

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

$orderby
query

string[]

The 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, and 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.

$select
query

string[]

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

$skip
query

integer

int32

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.

$top
query

integer

int32

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.

answers
query

QueryAnswerType

This parameter is only valid if the query type is semantic. If set, the query returns answers extracted from key passages in the highest ranked documents. The number of answers returned can be configured by appending the pipe character | followed by the count-<number of answers> option after the answers parameter value, such as extractive|count-3. Default count is 1. The confidence threshold can be configured by appending the pipe character | followed by the threshold-<confidence threshold> option after the answers parameter value, such as extractive|threshold-0.9. Default threshold is 0.7.

captions
query

QueryCaptionType

This parameter is only valid if the query type is semantic. If set, the query returns captions extracted from key passages in the highest ranked documents. When Captions is set to extractive, highlighting is enabled by default, and can be configured by appending the pipe character | followed by the highlight-<true/false> option, such as extractive|highlight-true. Defaults to None.

debug
query

QueryDebugMode

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

facet
query

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.

highlight
query

string[]

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

highlightPostTag
query

string

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

highlightPreTag
query

string

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

minimumCoverage
query

number

double

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.

queryLanguage
query

QueryLanguage

The language of the query.

queryType
query

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.

scoringParameter
query

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
query

string

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

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

search
query

string

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

searchFields
query

string[]

The 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
query

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.

semanticConfiguration
query

string

The name of the semantic configuration that lists which fields should be used for semantic ranking, captions, highlights, and answers

semanticErrorHandling
query

SemanticErrorMode

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

semanticFields
query

string[]

The list of field names used for semantic ranking.

semanticMaxWaitInMilliseconds
query

integer

int32

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
query

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
query

string

A value to be used to create a sticky session, which can help to get 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.

speller
query

Speller

Improve search recall by spell-correcting individual search query terms.

Request Header

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

string

uuid

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

Responses

Name Type Description
200 OK

SearchDocumentsResult

Response containing documents that match the search criteria.

Other Status Codes

ErrorResponse

Error response.

Examples

SearchIndexSearchDocumentsGet

Sample request

GET https://myservice.search.windows.net/indexes('myindex')/docs?search=nice hotels&$count=True&facet=category,count:10,sort:count&$filter=rating gt 10&highlight=title&highlightPostTag=</em>&highlightPreTag=<em>&minimumCoverage=80&$orderby=search.score() desc,rating desc&queryType=simple&scoringProfile=sp&searchFields=title,description&searchMode=any&scoringStatistics=global&sessionId=mysessionid&$select=docId,title,description&$skip=100&$top=10&api-version=2024-05-01-preview&speller={speller}

Sample response

{
  "@odata.count": 25,
  "@search.coverage": 80,
  "@search.facets": {
    "category": [
      {
        "count": 1,
        "value": "Economy"
      },
      {
        "count": 1,
        "value": "Luxury"
      }
    ]
  },
  "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"
    }
  ]
}

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.

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.

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.

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

Speller

Improve search recall by spell-correcting individual search query terms.

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.

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.

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.

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.

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.

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

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.

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.

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

Speller

Improve search recall by spell-correcting 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.

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.

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.

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.

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.

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.

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.