Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/binarymuse/elastic-movies
Testing Elasticsearch against a database of movie information
https://github.com/binarymuse/elastic-movies
Last synced: 29 days ago
JSON representation
Testing Elasticsearch against a database of movie information
- Host: GitHub
- URL: https://github.com/binarymuse/elastic-movies
- Owner: BinaryMuse
- Created: 2013-10-25T20:18:11.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-12-29T21:06:27.000Z (almost 11 years ago)
- Last Synced: 2024-04-09T01:05:25.225Z (7 months ago)
- Language: Ruby
- Size: 184 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Elasticsearch Movies
====================This project was built to test Elasticsearch. It performs searches against a database of 2000 of the top movies according to [The Movie DB](http://themoviedb.org).
Installation
------------First, follow the normal Rails application steps:
```bash
bundle install # install gems
rake db:create db:schema:load # create the DB and load the schema
```If you have an API key for [The Movie DB's API](http://www.themoviedb.org/documentation/api), you can run the following command to populate the database:
```bash
MOVIEDB_API_KEY="my_api_key" rake movies:populate
```To save some time, the IDs for the top 2000 movies are hardcoded; see `lib/tasks/movies.rake` for more information.
If you do *not* have an API key, you can [download an SQLite database preloaded with the data](https://github.com/BinaryMuse/elastic-movies/releases/download/demo/development.sqlite3). Simply drop it into your `db/` folder with the name `development.sqlite3`.
Creating the Elasticsearch Index
--------------------------------You can run
```bash
rake search:index
```to create the index. **This will erase any existing index named `movies` and create a new index of that name.**