mozilla / elasticutils

[deprecated] A friendly chainable ElasticSearch interface for python
http://elasticutils.rtfd.org
BSD 3-Clause "New" or "Revised" License
243 stars 76 forks source link

Hacks the action splitter in case we want to use __ as separator before the action separator. #273

Closed toopy closed 9 years ago

toopy commented 9 years ago

We would like to do some magic like indexing django related field implicitly like in this demo mapping: https://github.com/novapost/django-esutils/blob/master/demo/demo_esutils/mappings.py#L13

Then the BaseMappingType do the job: https://github.com/novapost/django-esutils/blob/master/django_esutils/mappings.py#L98

But to do that, we need to hack the current split_field_action method (cf.: this PR). What do you think about that ? Or is there another way to do it ?

willkg commented 9 years ago

It feels awkward. I'll think about this and see if I can think of alternative options.

toopy commented 9 years ago

Sorry my django project is still private for now. I try to make it public asap then it should help for your thinking ;)

toopy commented 9 years ago

It's ok, I just found another way to do it:

But I really need #272 this feature in a comming release ;)