Skip to main content

A tool to map Django models to ElasticSearch mappings

Project description

django-elasticmodels is a convenient tool to map your Django models to ElasticSearch mappings.

Project details

Code:

https://bitbucket.org/jvennik/django-elasticmodels

Documentation:

#

Issue tracker:

https://bitbucket.org/jvennik/django-elasticmodels/issues

License:

BSD 3-clause; see LICENSE file

Quick install

Latest released version:

$ pip install django-elasticmodels

Run the dev version (which is master tip):

$ pip install django-elasticmodels==dev

Usage

To use django-elasticmodels in your Django project:

  1. Add 'elasticmodels' to your INSTALLED APPS setting.

  2. Add 'ELASTICSEARCH_HOST' (string)

  3. Add 'ELASTIC_SEARCH_MODELS' (list) >> '["yourapp.yourmodel",]' to your settings file

  4. [Optional] Add 'ELASTICSEARCH_CUSTOM_TYPES' (dict) to your settings file if you want to specify a specific field type yourself >> Example: '"geo_location": {"type": "geo_point"}'

  5. [Optional] Add 'ELASTICSEARCH_NON_MODEL_FIELDS' (list). Here you can add fields that are not present on your model >> Example: '{"snippet": {"type": "string"}}'

  6. Run ./manage.py create_indexes

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-elasticmodels-0.1.1.tar.gz (4.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page