<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.3.2">
</HEAD>
<BODY>
I seriously doubt that is the intended behavior.<BR>
<BR>
It seems to me that is a very serious bug (possibly a relatively recent one, as well.)<BR>
<BR>
It is unfortunate that we don't have test that would detect that. If <BR>
you have the energy, please write such a test (probably based on code you<BR>
already have.)<BR>
<BR>
If you can't do it, I will be able to do it, but not until later this week.<BR>
<BR>
<BR>
On Sat, 2006-01-28 at 14:37 -0500, Ian Eslick wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">This was not clear in the documentation, but secondary db's appear to</FONT>
<FONT COLOR="#000000">have the following behavior.</FONT>
<FONT COLOR="#000000">btree - an indexed btree</FONT>
<FONT COLOR="#000000">inverted - an secondary index of btree</FONT>
<FONT COLOR="#000000">fn - A function that computes the secondary key given the value given to</FONT>
<FONT COLOR="#000000">btree</FONT>
<FONT COLOR="#000000">Write pkey/value1 into btree</FONT>
<FONT COLOR="#000000">inverted has fn(value1)/pkey</FONT>
<FONT COLOR="#000000">Change the association of pkey by writing</FONT>
<FONT COLOR="#000000">pkey/value2 into btree</FONT>
<FONT COLOR="#000000">inverted now has:</FONT>
<FONT COLOR="#000000">fn(value1)/pkey</FONT>
<FONT COLOR="#000000">fn(value2)/pkey</FONT>
<FONT COLOR="#000000">Namely, each secondary index contains the entire history of the values</FONT>
<FONT COLOR="#000000">of pkey and associates</FONT>
<FONT COLOR="#000000">them with pkey. If you are sorting and searching objects by using</FONT>
<FONT COLOR="#000000">secondary indices this is</FONT>
<FONT COLOR="#000000">not very useful. </FONT>
<FONT COLOR="#000000">Is this the intended functionality? This could be a setup problem on my</FONT>
<FONT COLOR="#000000">end or the way secondary</FONT>
<FONT COLOR="#000000">indices were intended to work. In which case it makes sense for me to</FONT>
<FONT COLOR="#000000">make sure that when</FONT>
<FONT COLOR="#000000">a secondary value changes, the original secondary key/value pair is</FONT>
<FONT COLOR="#000000">deleted from the secondary</FONT>
<FONT COLOR="#000000">index. I just discovered this and the uniqueness of mappings to pkey in</FONT>
<FONT COLOR="#000000">the above example is</FONT>
<FONT COLOR="#000000">crucial for my application.</FONT>
<FONT COLOR="#000000">Thank you,</FONT>
<FONT COLOR="#000000">Ian</FONT>
<FONT COLOR="#000000">_______________________________________________</FONT>
<FONT COLOR="#000000">elephant-devel site list</FONT>
<FONT COLOR="#000000"><A HREF="mailto:elephant-devel@common-lisp.net">elephant-devel@common-lisp.net</A></FONT>
<FONT COLOR="#000000"><A HREF="http://common-lisp.net/mailman/listinfo/elephant-devel">http://common-lisp.net/mailman/listinfo/elephant-devel</A></FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>