I'd like an elegant way to get a document from an elasticsearch index in haystack. Haystack seems to provide just queries but the Get API is not implemented and I found many examples where it would come handy.
I'm using SearchQuerySet with the internal _id field (found after some trial and error).
from haystack.query import SearchQuerySet
doc_id = myapp.my_model.id
model_instance = SearchQuerySet().filter(_id__exact=doc_id)[0].object
I think this will always be consistent but I'd like to know if there's any more elegant way.
Any idea?