[Xapian-discuss] collapsing by one value and sorting by another
Sascha Silbe
sascha-ml-devel-xapian-discuss at silbe.org
Sat Oct 17 21:11:22 BST 2009
Hi!
We're currently using Xapian to speed up searches in the Sugar datastore
[1]. Documents (called Journal objects) are identified by a UUID, this
is also used as the Xapian document id.
For version support (storing multiple versions of the same document) I
need to be able to return only the latest entry of a given document (or
rather set of documents in Xapian terms - they share a common UUID and
are identified by another one, both stored in a Xapian value).
Currently we let Xapian sort the match set (sort criteria chosen by
user) and only query for the documents we intend to show on screen
(parameters first and maxitems). Is there any way to do that (sorting by
user-chosen value number) while collapsing according to another value
number (the timestamp of the entry)?
I've found ways to use several sort keys (i.e. with the 2.+ only used if
the first returns equality), but nothing that would allow me to collapse
by a different value than the sort uses (values are often non-unique).
[1] http://wiki.sugarlabs.org/go/Development_Team/Datastore_Rewrite
CU Sascha
--
http://sascha.silbe.org/
http://www.infra-silbe.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: Digital signature
URL: <http://lists.xapian.org/pipermail/xapian-discuss/attachments/20091017/93290942/attachment.pgp>
More information about the Xapian-discuss
mailing list