Usage for simple cases is very similar as with Tastypie. You should read their tutorial first.
The main difference is when you are defining API resource files. There you must use ESResource instead of ModelResource or Resource.
from django.conf import settings
from tastypie import authorization from tastypie_elasticsearch import resources from test_app import documents
class Meta:
- es_server = getattr(settings,
- “ES_INDEX_SERVER”, “http://127.0.0.1:9200/”)
es_timeout = 20
indices = [“my_elasticsearch_index”]