[Xapian-discuss] Document and folder suggestions
Serkan Cabi
cabi at MIT.EDU
Sun Jan 27 21:01:54 GMT 2008
Hello,
I'm working on a document manager using Xapian. If you are familiar
with, it will hopefully be something similar to Devonthink on Mac.
There are two crucial features, finding similar documents and
suggesting an existing folder for a document. Xapian website claims to
do that:
"Relevance feedback - given one or more documents, Xapian can suggest
the most relevant index terms to expand a query, suggest related
documents, categorise documents, etc."
Currently to find related documents I get a document, create a one
item rset, get eset of max size 100 of it and search those terms to
get a list of documents. Here is the code:
Xapian::RSet rSelection=Xapian::RSet();
rSelection.add_document(currentDocID);
Xapian::ESet eset = enquire.get_eset(100, rSelection);
Xapian::Query query(Xapian::Query::OP_OR, eset.begin(), eset.end());
enquire.set_query(query);
Xapian::MSet matches = enquire.get_mset(0, 10);
and here are my questions:
1) Is there a better way to get similar documents for a given document?
2) Is there way to suggest a folder for a given document to be
classified in?
Thank you very much in advance.
--
Serkan Cabi
MIT Center for Theoretical Physics
More information about the Xapian-discuss
mailing list