Skip to content

Commit

Permalink
[Azure Search] Add filter property to autocomplete request for search…
Browse files Browse the repository at this point in the history
… SDK (#5532)

* initial change to add filter property to autocomplete request

* providing more clear description for filters in autocomplete
  • Loading branch information
ishansrivastava90 authored and kpajdzik committed Apr 4, 2019
1 parent 57928e5 commit 65f98d7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
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

0 comments on commit 65f98d7

Please sign in to comment.