Menu
Documents Search Post
Searches for documents in the index.
/indexes('{indexName}')/docs/search.post.searchUse it in a workflow
- Add a step and choose the Azure AI Search connector.
- Pick the Documents Search Post action (under Documents).
- Fill in the fields below, then reference the result from later steps as
{{documentsSearchPost.response.data}}.
Request
Path parameters
indexNamestringrequiredThe name of the index.
Request body
Enter the body as JSON in the step's Body field.
countbooleanA 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.
facetsarray<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.
filterstringThe OData $filter expression to apply to the search query.
highlightstringThe comma-separated list of field names to use for hit highlights. Only searchable fields can be used for hit highlighting.
highlightPostTagstringA string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is </em>.
highlightPreTagstringA string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default is <em>.
minimumCoveragenumber (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.
orderbystringThe 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.
queryTypestringSpecifies the syntax of the search query. The default is 'simple'. Use 'full' if your query uses the Lucene query syntax.
One ofsimplefullsemantic
scoringStatisticsstringA 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.
One oflocalglobal
sessionIdstringA 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.
scoringParametersarray<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).
scoringProfilestringThe name of a scoring profile to evaluate match scores for matching documents in order to sort the results.
debugstringEnables a debugging tool that can be used to further explore your search results.
One ofdisabledvector
searchstringA full-text search query expression; Use "*" or omit this parameter to match all documents.
searchFieldsstringThe 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.
searchModestringSpecifies whether any or all of the search terms must be matched in order to count the document as a match.
One ofanyall
selectstringThe comma-separated list of fields to retrieve. If unspecified, all fields marked as retrievable in the schema are included.
skipinteger (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.
topinteger (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.
semanticConfigurationstringThe name of a semantic configuration that will be used when processing documents for queries of type semantic.
semanticErrorHandlingstringAllows the user to choose whether a semantic call should fail completely, or to return partial results.
One ofpartialfail
semanticMaxWaitInMillisecondsinteger (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.
semanticQuerystringAllows 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.
answersstringThis 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.
One ofnoneextractive
captionsstringThis 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`.
One ofnoneextractive
vectorQueriesarray<object>The query parameters for vector and hybrid search queries.
kindstringrequiredThe kind of vector query being performed.
One ofvectortext
kinteger (int32)Number of nearest neighbors to return as top hits.
fieldsstringVector Fields of type Collection(Edm.Single) to be included in the vector searched.
exhaustivebooleanWhen 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.
oversamplingnumber (double)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.
weightnumber (float)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.
vectorFilterModestringDetermines whether or not filters are applied before or after the vector search is performed.
One ofpostFilterpreFilter
{
"count": false,
"facets": [
"string"
],
"filter": "string",
"highlight": "string",
"highlightPostTag": "string",
"highlightPreTag": "string",
"minimumCoverage": 0,
"orderby": "string",
"queryType": "simple",
"scoringStatistics": "local",
"sessionId": "string",
"scoringParameters": [
"string"
]
}
Response
Returns 200 with a any. Read it in later steps with {{documentsSearchPost.response.data.<field>}}.
Need more? See the Azure AI Search guide for connection setup and behaviour shared by every action.