We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
Can't filter onAutocomplete results, there is no mention in the docs, but the type definition allows me to add the filters. https://docs.elastic.co/search-ui/api/core/configuration#autocomplete-query
Question: The docs also mention a global queryConfig which could maybe solve/workaround my problem: #890
To Reproduce Steps to reproduce the behavior:
Put this in results on autocompleteQuery for the search UI config
autocompleteQuery: { results: { filters: [{ field: "id", type: "all", values: ["park_wind-cave"] }],
https://codesandbox.io/s/nice-curie-fy9js1?file=/src/pages/elasticsearch/index.js
Note that in App Search this works fine! I tested both in the sandbox!
Expected behavior Only show autosuggestion with that id if not supported yet, don't add it to the type definition and make it clear in the docs.
Screenshots
Which backends and packages are you using: Backend: [Elasticsearch] Packages: [react-search-ui]
// frontend "@elastic/react-search-ui": "^1.17.1", "@elastic/react-search-ui-views": "^1.17.1", "@elastic/search-ui": "^1.17.1", // api "@elastic/elasticsearch": "^8.2.1", "@elastic/search-ui-elasticsearch-connector": "^1.17.1",
The text was updated successfully, but these errors were encountered:
I looked into the package itself: It does look like there is no code related to filters at all in the autocomplete folder:
filters
handlers/autocomplete/index.js
while in handlers/search there is something done with the filters object:
handlers/search
const baseFilters = buildBaseFilters(queryConfig.filters);
Sorry, something went wrong.
Great catch, again. I appreciate the bug report.
No branches or pull requests
Describe the bug
Can't filter onAutocomplete results, there is no mention in the docs, but the type definition allows me to add the filters.
https://docs.elastic.co/search-ui/api/core/configuration#autocomplete-query
Question: The docs also mention a global queryConfig which could maybe solve/workaround my problem: #890
To Reproduce
Steps to reproduce the behavior:
Put this in results on autocompleteQuery for the search UI config
https://codesandbox.io/s/nice-curie-fy9js1?file=/src/pages/elasticsearch/index.js
Note that in App Search this works fine! I tested both in the sandbox!
Expected behavior
Only show autosuggestion with that id
if not supported yet, don't add it to the type definition and make it clear in the docs.
Screenshots
![image](https://user-images.githubusercontent.com/24491661/198562675-a24acc72-3bee-4e66-9779-97de6619d670.png)
![image](https://user-images.githubusercontent.com/24491661/198562710-ff946e79-634b-4d4c-9d6b-8be6aa8caafa.png)
Which backends and packages are you using:
Backend: [Elasticsearch]
Packages: [react-search-ui]
The text was updated successfully, but these errors were encountered: