SearchPostRequest Class
SearchPostRequest.
Constructor
SearchPostRequest()
Variables
| Name | Description |
|---|---|
|
count
|
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. |
|
facets
|
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
|
The OData $filter expression to apply to the search query. |
|
highlight
|
The comma-separated list of field names to use for hit highlights. Only searchable fields can be used for hit highlighting. |
|
highlightPostTag
|
A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is </em>. |
|
highlightPreTag
|
A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default is <em>. |
|
minimumCoverage
|
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. |
|
moreLikeThis
|
The key of the document to use as the basis for finding similar documents. This parameter cannot be used together with search text. |
|
orderby
|
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. |
|
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. Known values are: "simple", "full", and "semantic". |
|
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. Known values are: "local" and "global". |
|
sessionId
|
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. |
|
scoringParameters
|
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
|
The name of a scoring profile to evaluate match scores for matching documents in order to sort the results. |
|
debug
|
Enables a debugging tool that can be used to further explore your reranked results. Known values are: "disabled", "semantic", "vector", "queryRewrites", "innerHits", and "all". |
|
search
|
A full-text search query expression; Use "*" or omit this parameter to match all documents. |
|
searchFields
|
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
|
A value that specifies whether any or all of the search terms must be matched in order to count the document as a match. Known values are: "any" and "all". |
|
select
|
The comma-separated list of fields to retrieve. If unspecified, all fields marked as retrievable in the schema are included. |
|
skip
|
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
|
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. |
|
semanticConfiguration
|
The name of a semantic configuration that will be used when processing documents for queries of type semantic. |
|
semanticErrorHandling
|
Allows the user to choose whether a semantic call should fail completely (default / current behavior), or to return partial results. Known values are: "partial" and "fail". |
|
semanticMaxWaitInMilliseconds
|
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
|
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. |
|
answers
|
A value that specifies whether answers should be returned as part of the search response. Known values are: "none" and "extractive". |
|
captions
|
A value that specifies whether captions should be returned as part of the search response. Known values are: "none" and "extractive". |
|
vectorQueries
|
list[<xref:"VectorQuery">]
The query parameters for vector and hybrid search queries. |
|
vectorFilterMode
|
Determines whether or not filters are applied before or after the vector search is performed. Default is 'preFilter' for new indexes. Known values are: "postFilter" and "preFilter". |
Methods
| clear | |
| copy | |
| fromkeys |
Create a new dictionary with keys from iterable and values set to value. |
| get |
Return the value for key if key is in the dictionary, else default. |
| items | |
| keys | |
| pop |
If the key is not found, return the default if given; otherwise, raise a KeyError. |
| popitem |
Remove and return a (key, value) pair as a 2-tuple. Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty. |
| setdefault |
Insert key with a value of default if key is not in the dictionary. Return the value for key if key is in the dictionary, else default. |
| update |
If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k] |
| values |
clear
clear() -> None. Remove all items from D.
copy
copy() -> a shallow copy of D
fromkeys
Create a new dictionary with keys from iterable and values set to value.
fromkeys(value=None, /)
Positional-Only Parameters
| Name | Description |
|---|---|
|
iterable
Required
|
|
|
value
|
Default value: None
|
get
Return the value for key if key is in the dictionary, else default.
get(key, default=None, /)
Positional-Only Parameters
| Name | Description |
|---|---|
|
key
Required
|
|
|
default
|
Default value: None
|
items
items() -> a set-like object providing a view on D's items
keys
keys() -> a set-like object providing a view on D's keys
pop
If the key is not found, return the default if given; otherwise, raise a KeyError.
pop(k, [d]) -> v, remove specified key and return the corresponding value.
popitem
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
popitem()
setdefault
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
setdefault(key, default=None, /)
Positional-Only Parameters
| Name | Description |
|---|---|
|
key
Required
|
|
|
default
|
Default value: None
|
update
If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
update([E], **F) -> None. Update D from mapping/iterable E and F.
values
values() -> an object providing a view on D's values
Attributes
answers
A value that specifies whether answers should be returned as part of the search response. Known values are: "none" and "extractive".
answers: str | QueryAnswerType
captions
A value that specifies whether captions should be returned as part of the search response. Known values are: "none" and "extractive".
captions: str | QueryCaptionType
count
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.
count: bool
debug
Enables a debugging tool that can be used to further explore your reranked results. Known values are: "disabled", "semantic", "vector", "queryRewrites", "innerHits", and "all".
debug: str | QueryDebugMode
facets
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.
facets: list[str]
filter
The OData $filter expression to apply to the search query.
filter: str
highlight
The comma-separated list of field names to use for hit highlights. Only searchable fields can be used for hit highlighting.
highlight: list[str]
highlightPostTag
A string tag that is appended to hit highlights. Must be set with highlightPreTag. Default is </em>.
highlightPostTag: str
highlightPreTag
A string tag that is prepended to hit highlights. Must be set with highlightPostTag. Default is <em>.
highlightPreTag: str
minimumCoverage
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.
minimumCoverage: float
moreLikeThis
The key of the document to use as the basis for finding similar documents. This parameter cannot be used together with search text.
moreLikeThis: str
orderby
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.
orderby: list[str]
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. Known values are: "simple", "full", and "semantic".
queryType: str | QueryType
scoringParameters
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).
scoringParameters: list[str]
scoringProfile
The name of a scoring profile to evaluate match scores for matching documents in order to sort the results.
scoringProfile: str
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. Known values are: "local" and "global".
scoringStatistics: str | ScoringStatistics
search
A full-text search query expression; Use "*" or omit this parameter to match all documents.
search: str
searchFields
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.
searchFields: list[str]
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. Known values are: "any" and "all".
searchMode: str | SearchMode
select
The comma-separated list of fields to retrieve. If unspecified, all fields marked as retrievable in the schema are included.
select: list[str]
semanticConfiguration
The name of a semantic configuration that will be used when processing documents for queries of type semantic.
semanticConfiguration: str
semanticErrorHandling
Allows the user to choose whether a semantic call should fail completely (default / current behavior), or to return partial results. Known values are: "partial" and "fail".
semanticErrorHandling: str | SemanticErrorMode
semanticMaxWaitInMilliseconds
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.
semanticMaxWaitInMilliseconds: int
semanticQuery
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.
semanticQuery: str
sessionId
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.
sessionId: str
skip
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.
skip: int
top
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.
top: int
vectorFilterMode
Determines whether or not filters are applied before or after the vector search is performed. Default is 'preFilter' for new indexes. Known values are: "postFilter" and "preFilter".
vectorFilterMode: str | VectorFilterMode
vectorQueries
The query parameters for vector and hybrid search queries.
vectorQueries: list['VectorQuery']