[Xapian-discuss] Xapian-discuss Digest, Vol 88, Issue 9

James Aylett james-xapian at tartarus.org
Wed Sep 21 16:43:52 BST 2011


On 21 Sep 2011, at 15:54, Sam Millman wrote:

> Sorry about the personal reply, Gmail fail :).

:)

> To double check in the eyes of a phper:
> 
> "The new value will replace any existing value in the same slot (or if the
> new value is empty, it will remove any existing value in the same slot)."
> 
> That sounds more like adding a value at that position on the array so that:
> 
> $doc->add_value(1, "cheese");
> 
> Would add "cheese" term at position one of your document.
> 
> $doc->add_value(1, "woo");
> 
> Would override "cheese" with the new value at position one to create:

Pretty much, yes.

> array(
>   1 => "cheese"
> );
> 
> If that is the case (which I believe it is now) then that is much better.


The only thing I'd caution is that it's not helpful to think of values at living at "positions" in a document, since positions are terminology used when discussed *terms* in a document. Values live in slots, but it's effectively a (sparse) array, yes.

J

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




More information about the Xapian-discuss mailing list