myarik / django-rest-elasticsearch

Elasticsearch support for Django REST Framework
Other
192 stars 38 forks source link

Change example #40

Open ernst545 opened 5 years ago

ernst545 commented 5 years ago

In this example class Meta should be changed to class Index

class BlogIndex(DocType):
    pk = Integer()
    title = Text(fields={'raw': Keyword()})
    created_at = Date()
    body = Text()
    tags = Keyword(multi=True)
    is_published = Boolean()

    class Meta:
        index = 'blog'

This api has changed in the previous release of elasticsearch-dsl-py:

class Index:
    name = 'blog'
josemlp91 commented 5 years ago

@ernst545 updated!