-
Notifications
You must be signed in to change notification settings - Fork 1
Search and Suggestion
K Sashi Kumar edited this page Jul 23, 2017
·
2 revisions
For search, Forli is dependent on Elasticsearch(5.5)
. Searchkick gem is used to communicate with Elasticsearch. Searchkick provides flexible and easy API to interact with Elasticsearch.
The Similar questions API is built with Searchkick's similar
API which uses more_like_this
Elasticsearch Query API.
Questions and Tag suggestion API is built with the default filtering API.
All the search and suggestions API implementation could be find in: app/controllers/search_controller.rb
The indexing logic is done in: lib/search/searchable.rb
After each create
and update
of the ES indexed columns, the data is pushed to background for ES indexing