[Xapian-discuss] patch proposal: omindex library or daemon

James Aylett james-xapian at tartarus.org
Mon Oct 24 18:17:43 BST 2011


On 24 Oct 2011, at 05:10, Liam wrote:

>>> void Document::set_values_and_data(const std::map<std::string,
>>> std::string>& fields, const std::vector<std::string>& omit_fields=0);
>>> // omit_fields is a list of field names to omit from Document values
>>> // might live in class MimeDocument : public Document
>> 
>> I'm not so convinced by this; and it's certainly not something that I
>> think is needed to make a useful library around omindex.  Given the
>> text data from the fields, it's very easy to use TermGenerator to
>> index the content, or to call your own routines.
> 
> Use TermGenerator? Wouldn't the user typically call Document::set_data()?
> Forgive my inexperience…


Document::set_data has nothing to do with terms or values (which are used for searching); its typical use is as a place to store information about the document that you'd use after having retrieved it from an MSet. So you might put a sample there, or a pre-rendered HTML preview blob, or (as omega does) a number of pieces of information that can be used to create a preview on the fly.

J

-- 
 James Aylett
 talktorex.co.uk - xapian.org - devfort.com - spacelog.org




More information about the Xapian-discuss mailing list