![OpenCrowd][1] [1]: https://secure.gravatar.com/avatar/ec08b78d5a9c25a3d78a0b5d471fad83?s=420&d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png
- An ElasticSearch instance
- Python & Django >= 1.4
- Clone this repo
git clone git://github.com/opencrowd/elasticsearch-tutorial.git
- Create the ElasticSearch type mappings
python manage.py put_mappings
- Run the server
python manage.py runserver
- Point your browser at http://localhost:8000/simple/
The project's views are defined in views.py. The functions that query and store data into ElasticSearch are defined in models.py; these are purposefully kept minimal.
This project barely uses the Django ORM -- it uses it for the django.contrib.auth User model. By default, it uses sqllite3 for this; you can (and should) configure it to point at an appropriate database configuration.
You can control the ElasticSearch index and connection via the ELASTICSEARCH_URL and ELASTICSEARCH_INDEX variables in settings.py. These default to 'http://localhost:9200' and 'blog' respectively.
The only "fancy" thing that this tutorial app does beyond ElasticSearch CRUD-type operations is using akismet for spam detection for comments. You should put your akismet key information in the apikey.txt file. If you don't want to use akismet, you can disable that in settings.py defining USE_AKIMSET as False.
The web templates are kept purposefully simple, using bare minimum bootstrap functionality.