-
Notifications
You must be signed in to change notification settings - Fork 332
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
feat(plugins): introduce Query Suggestions plugin #360
feat(plugins): introduce Query Suggestions plugin #360
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 706245b:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super cool wrapping!
autocomplete({ | ||
container: '#autocomplete', | ||
openOnFocus: true, | ||
plugins: [recentSearches, querySuggestions], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the main example should probably still show results as well as query suggestions, to show more of the full api, wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah eventually we'll have examples in other places, that's used for dev only for now—so not too much of a deal!
# @algolia/autocomplete-plugin-query-suggestions | ||
|
||
A plugin to add Query Suggestions to Algolia Autocomplete. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add some info here to link to the query suggestions feature?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, we'll work on an exhaustive doc with Maria so we'll wait for this content before changing this doc multiple times if you don't mind.
How do you deduplicate searches between multiple query suggestion sources / regular hits? |
@Haroenv Right now we only duplicate RS/QS when provided explicitly with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it would be better to have a more complete readme that can be changed later; the code sample would most likely stay the same, and in the mean time it wouldn't be as straightforward to use this in an app, but I understand not wanting to rewrite I guess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. A good addition!
This introduces a new Autocomplete plugin: the Query Suggestions plugin.
Usage
Basic
Using with Recent Searches
Changes
getSources
function becomes optionalgetAlgoliaSearchParams
(see example above)Next steps