-
-
Notifications
You must be signed in to change notification settings - Fork 968
[GSoC]Add autocompletion for search boxes #2047
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
Conversation
436eaa8
to
8d46600
Compare
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.
Thank for working on this @shunshunNi 💯 It is in working state, we need to make a few improvements.
analyzer: { | ||
rubygem: { | ||
filter: { | ||
autocomplete_ngram: { |
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.
Can you please share your findings related to ngram being faster than suggest API?
What was your method of testing this and how much miliseconds faster was ngram on your local setup?
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.
As I ran the test, I think the execution time is so small and it could be negligible. In addition, actually completion suggester seems faster. See my gist how I've collect a result.
https://gist.github.com/shunshunNi/81604414181a5ee69ae3f5f497791b2b
4c38eb1
to
ae798b9
Compare
ae798b9
to
365aac5
Compare
0e97c8d
to
6da36b8
Compare
remove autocomplete from search controller change autocomplete function to plugin add sample test for autocomplete add autocomplete test add sources for CSP refactor autocomplete javascript improve autocomplete test fix style and CSP Add ctrl + n & p selecting in autocomplete Refactoring autocomplete.js refactoring autocomplete.js add chrome: stable to run travis-ci correctly refactor autocomplete.js add functional t 8000 ests for autocomplete api change method name suggest => suggestions add tests for suggestions in lib/elastic_searcher.rb change list name change autocomplete using ngram_edge to completion suggester fix mapping & analyzer error set before_action for autocomplete Pass api as an argument for search Move returning of gems name function from controller to model
6da36b8
to
2d1d3c9
Compare
we don't need binding on ctrl + p, n for selection. we don't need to preserve form input when looping over result. removed code related to these parts.
c75d259
to
eeb6b6d
Compare
eeb6b6d
to
8b3db39
Compare
This PR goal is to provide autocomplete function(incremental search) for search boxes.
Currently this branch has two main parts.
Using n-gram filter, "name" can be autocompleted.
Using JQuery autocomplete with the gem 'jquery-ui-rails' , autocompletion work for the search box on the top page.
There are some problems for my implementation. Please check to run the tests.
Sorry, I accidentally closed the PR.