Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vannguyenvietnam/searchapp-sample
https://github.com/vannguyenvietnam/searchapp-sample
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/vannguyenvietnam/searchapp-sample
- Owner: vannguyenvietnam
- Created: 2016-08-13T17:11:57.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-09-02T05:14:46.000Z (about 3 years ago)
- Last Synced: 2024-08-01T19:45:29.463Z (3 months ago)
- Language: Ruby
- Size: 3.99 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
Awesome Lists containing this project
README
= Ruby on Rails and Elasticsearch: Example application
This application is an example of integrating the {Elasticsearch}[http://www.elasticsearch.org]
search engine with the {Ruby On Rails}[http://rubyonrails.org] web framework.It has been generated by application templates available at
https://github.com/elasticsearch/elasticsearch-rails/tree/master/elasticsearch-rails/lib/rails/templates.== [1] Basic
The `basic` version provides a simple integration for a simple Rails model, `Article`, showing how
to include the search engine support in your model, automatically index changes to records,
and use a form to perform simple search require 'requests.'== [2] Pretty
The `pretty` template builds on the `basic` version and brings couple of improvements:
* Using the [Bootstrap](http://getbootstrap.com) framework to enhance the visual style of the application
* Using an `Article.search` class method to customize the default search definition
* Highlighting matching phrases in search results
* Paginating results with Kaminari== [3] Expert
The `expert` template changes to a complex database schema with model relationships: article belongs
to a category, has many authors and comments.* The Elasticsearch integration is refactored into the `Searchable` concern
* A complex mapping for the index is defined
* A custom serialization is defined in `Article#as_indexed_json`
* The `search` method is amended with facets and suggestions
* A [Sidekiq](http://sidekiq.org) worker for handling index updates in background is added
* A custom `SearchController` with associated view is added
* A Rails initializer is added to customize the Elasticsearch client configuration
* Seed script and example data from New York Times is added