liberation / django-elasticsearch

Simple wrapper around elasticsearch-py to index/search a django Model.
MIT License
211 stars 73 forks source link

Unable to get repr for <class 'django_elasticsearch.query.EsQueryset'> #76

Closed mugbya closed 7 years ago

mugbya commented 7 years ago

hi, I wrote test code

model


from django_elasticsearch.models import EsIndexable

class UserInfoSE(EsIndexable, models.Model):
    tel = models.CharField(max_length=50, null=True, unique=False, default='')

view

UserInfoSE.es.queryset.all()

and settings:

ELASTICSEARCH_URL = 'http://192.168.99.101:9200'

but I got some error: Unable to get repr for <class 'django_elasticsearch.query.EsQueryset'>

lauxley commented 7 years ago

That's weird and probably shouldn't be this way but it's not the documented way to call .all(), try UserInfoSE.es.all().