liberation / django-elasticsearch

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

Standart serialization #45

Open onegreyonewhite opened 8 years ago

onegreyonewhite commented 8 years ago

I am trying to use native django deserialization with EsIndexable models. But django returns DeserializedObject. Do you have any idea how to fix it? I`ll continue trying to fix it, but any idea would be helpful.

lauxley commented 8 years ago

It sounds like a good idea, what do mean by how to fix it ? what is the problem ?

onegreyonewhite commented 8 years ago

Sorry! It is my bad. I found in DeserializedObject attribute es. Now everything is fine.

onegreyonewhite commented 8 years ago

But native serializers.serialize("xml", Traps.es.all()) still does not work becouse:

SerializationError: Non-model object (<type 'dict'>) encountered during serialization

Why EsIndexable.es.search() return dict? Why not EsIndexable object?