The sample code still creates ES string field that's analyzed.
Tried this:
username = String(fields={'raw': String(index='not_analyzed')})
And this:
username = String(index="not_analyzed")
Try calling <className>.init() on the class where you're defining username. That should create the mappings in ES.
See http://elasticsearch-dsl.readthedocs.io/en/latest/persistence.html?highlight=init#document-life-cycle for more info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With