Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Azure Search] Add filter property to autocomplete request for search SDK #5532

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"autocompleteMode": "oneTerm",
"search": "washington medic",
"suggesterName": "sg",
"filter": "search.in(docId,'101,102,105')",
"fuzzy": false,
"highlightPostTag": "</em>",
"highlightPreTag": "<em>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"autocompleteMode": "oneTerm",
"search": "washington medic",
"suggesterName": "sg",
"filter": "search.in(docId,'101,102,105')",
"highlightPostTag": "</em>",
"highlightPreTag": "<em>",
"minimumCoverage": 80,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
"name": "SearchMode",
"modelAsString": false
},
"x-nullable": false,
"x-nullable": false,
"description": "A value that specifies whether any or all of the search terms must be matched in order to count the document as a match.",
"x-ms-parameter-grouping": {
"name": "SearchParameters"
Expand Down Expand Up @@ -341,7 +341,7 @@
"tags": [
"Documents"
],
"operationId": "Documents_Get",
"operationId": "Documents_Get",
"externalDocs": {
"url": "https://docs.microsoft.com/rest/api/searchservice/lookup-document"
},
Expand Down Expand Up @@ -392,7 +392,7 @@
"operationId": "Documents_SuggestGet",
"externalDocs": {
"url": "https://docs.microsoft.com/rest/api/searchservice/suggestions"
},
},
"x-ms-examples": {
"SearchIndexSuggestDocumentsGet": { "$ref": "./examples/SearchIndexSuggestDocumentsGet.json" }
},
Expand Down Expand Up @@ -578,7 +578,7 @@
},
"x-ms-examples": {
"SearchIndexIndexDocuments": { "$ref": "./examples/SearchIndexIndexDocuments.json" }
},
},
"description": "Sends a batch of document write actions to the Azure Search index.",
"parameters": [
{
Expand Down Expand Up @@ -668,6 +668,15 @@
"name": "AutocompleteParameters"
}
},
{
"name": "$filter",
"in": "query",
"type": "string",
"description": "An OData expression that filters the documents used to produce completed terms for the Autocomplete result.",
"x-ms-parameter-grouping": {
"name": "AutocompleteParameters"
}
},
{
"name": "fuzzy",
"in": "query",
Expand Down Expand Up @@ -1181,6 +1190,13 @@
"$ref": "#/definitions/AutocompleteMode",
"description": "Specifies the mode for Autocomplete. The default is 'oneTerm'. Use 'twoTerms' to get shingles and 'oneTermWithContext' to use the current context while producing auto-completed terms."
},
"filter": {
"externalDocs": {
"url": "https://docs.microsoft.com/rest/api/searchservice/OData-Expression-Syntax-for-Azure-Search"
},
"type": "string",
"description": "An OData expression that filters the documents used to produce completed terms for the Autocomplete result."
},
"fuzzy": {
"type": "boolean",
"description": "A value indicating whether to use fuzzy matching for the autocomplete query. Default is false. When set to true, the query will autocomplete terms even if there's a substituted or missing character in the search text. While this provides a better experience in some scenarios, it comes at a performance cost as fuzzy autocomplete queries are slower and consume more resources.",
Expand Down