Safwan Rahman
Safwan Rahman
@Andrew-Chen-Wang Seems like it is not supported by elasticsearch-dsl still! I would suggest you to wait untill it get upstream support. BTW, Thanks @sethmlarson for keeping eye on this project!...
In open source world, you should make a Pull Request so we can discuss it further. Let it not remain unsaid that "Talk is cheap, show me the code"
I think you can do something like this ```python class DefaultDocumentType(DocType): tenant_id = fields.KeywordField() def prepare_tenant_id(self, instance): return get_active_tenant().id ``` and use ``DefaultDocumentType`` everywhere you do need.
have you tried placing the mixin after the DocType class? ```python class CarDocument(DocType, DefaultDocumentFieldsMixin): pass ```
@krelst Did it work?
I think its better to open issue in `elasticsearch-dsl` package then. the meta class is making all the magics!
It seems to be a bug in this end maybe add a meta class in the abstract docType class? ```python class DefaultDocumentType(DocType): tenant_id = fields.KeywordField() class Meta: model = None...
@krelst I understand. so for workaround can you just pass a model class in the `model` attribute and try with that?
@krelst It can be implemented. But need some modification in the metaclass that we are modifying. I am trying to make it compatable with latest version of `elasticsearch-dsl` and I...
What is KNN?