Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
app
bin
config
db
lib
log
public
test
vendor/assets
.gitignore
Gemfile
Gemfile.lock
README.rdoc
Rakefile
config.ru

README.rdoc

Search Example Application with Rails and Elasticsearch

## Functions

  • Search / Filter

  • Pagination

  • Sort

  • Aggregations (Facets) / Post Filter

  • Highlight

  • Autocomplete with Suggest

## Development

Install elasticsearch and Run

“` brew install elasticsearch elasticsearch “`

Create database and insert sample data (username: postgres, password: postgres)

“` createdb -U postgres elasticsearch_test_development psql -U postgres elasticsearch_test_development < db/dump.sql “`

Create index and import data from database to elasticsearch

“` bundle exec rails console Restaurant.__elasticsearch__.create_index! force: true Restaurant.__elasticsearch__.refresh_index! Restaurant.import “`

Run rails server (WEBrick) and open search page

“` bundle exec rails server open localhost:3000 “`