garaio/xapian_db — Issue #27: how to get xapian document from model
Author: thoughtafter
Created: 2012-01-30 19:33:31+00:00
State: open

I know this is more of a question instead of an issue, unless this cannot be easily done, then it is an issue. I want to get the xapian document from a model. Specifically I'd like to do this to use find_similar_to:

Model.find_similar_to(Model.first.xapian_document)

Or something like that. Of course find_similar_to could potentially be updated to allow a model but I think this will have other applications as well. Basically I'm looking for an inverse of the indexed_object property. I'm thinking there's probably a Xapian method to retrieve a document by the xapian_id but I haven't dug deeply enough to find it.