On 2 November 2011 09:50, Justin Finkelstein <justin at redwiredesign.com>
wrote:> Over the weekend, we were chatting about recording searches and feeding
> that back into Xapian to improve results accuracy and I'm wondering how
> this works.
> Also, I've noticed on the Features page on xapian.org, there's
mention
> of getting related documents out; is there any documentation (either in
> the API or otherwise) that describes this?
I'm not sure there is any documentation of how to do this: roughly,
what you do to find similar documents to a set of documents (or a
single document) is:
- build an RSet with the ids of the documents you're starting with.
- build an ESet from that (with enquire.get_eset())
- use that ESet in a query (joined with OP_OR); the top few documents
of the results of that should be similar to your starting documents.
There's lots of subtleties, and ways to tune it, though; I think this
would be a good "how to" document to write in the second part of the
sprint this weekend.
--
Richard