[Xapian-discuss] Document and folder suggestions

Olly Betts olly at survex.com
Tue Jan 29 15:39:56 GMT 2008


On Mon, Jan 28, 2008 at 01:13:43AM -0500, Serkan Cabi wrote:
> Hello,
> I didn't quite understand the second answer:
> >Assuming you add a boolean term for the folder to each document in the
> >database, run the given document as a query, and mark the top few
> >results as relevant, then expand selecting only the folder terms.

> What do you mean by "a boolean term"?

A term added using Document::add_term() for the purpose of filtering.

Actually, there isn't really a black/white distinction inside Xapian,
but such a term generally doesn't have positional information or wdf
whereas terms generated from "free text" usually do.

> I now store the path by Document::set_data() and the file content by  
> TermGenerator::index_text().

You can add the path as a term as well like so:

    doc.add_term("XPATH" + path);

Cheers,
    Olly



More information about the Xapian-discuss mailing list