liberation / django-elasticsearch

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

Filter Contains #63

Closed ghost closed 7 years ago

ghost commented 7 years ago

Filter contains didn't work,,,

>>> ModelBuah.es.get(id=3)
{u'nama': u'Langsat', u'jml': 50}
>>> ModelBuah.es.filter(nama__contains='sat')
[]
>>> ModelBuah.es.queryset.filter(nama__contains='sat')
[]
lauxley commented 7 years ago

It depends how you tokenize the 'nama' field.

ghost commented 7 years ago

What do you mean? Can you point to part of manual about tokenize?

lauxley commented 7 years ago

partial word tokenizer