[Xapian-discuss] Document values vs data
Garrett Smith
g at rre.tt
Fri Jan 1 15:01:20 GMT 2010
On Fri, Jan 1, 2010 at 8:15 AM, Peter Karman <peter at peknet.com> wrote:
> Garrett Smith wrote on 1/1/10 7:31 AM:
>>
>> In a recent post, someone asked about storing "metadata" in a
>> document. My guess would have been to use add_value. Olly's
>> recommendation was to use set_data.
>>
>> What are the general guidelines for deciding whether to use values or
>> data in a document?
>>
>
> values can be used for sorting and filtering results.
> data is arbitrary storage associated with a document.
>
> where you store your metadata depends on how you intend to use it.
Thanks Peter.
Is there any additional cost in storing values rather than data? It
seems far more convenient to store "metadata" type information in
values rather than data given they can be retrieved individually. I.e.
using data, one has to encode/decode a single opaque value so I'm
assuming there's some payoff in that case (index size, indexing
performance, etc.)
More information about the Xapian-discuss
mailing list