notanumber/xapian-haystack — Issue #91: DateTime index ordering occasionally simply incorrect.
Author: melinath
Created: 2012-02-07 23:38:07+00:00
State: open

I'm involved in a project which uses haystack to handle cases like "display results which are in this category, sorted by date". We're using xapian-haystack. The ordering on the fields is... bizarre. Here's an example; the columns are: results[n].date, results[n+1].date, results[n].date >= results[n+1].date, and the ordering is '-date' (so the right column should always be True.)

{{{
2011-09-24 05:28:53 2011-09-23 23:21:16 True
2011-09-23 23:21:16 2011-09-23 17:44:44 True
2011-09-23 17:44:44 2011-09-22 18:39:28 True
2011-09-22 18:39:28 2011-09-22 13:30:00 True
2011-09-22 13:30:00 2011-09-22 12:58:14 True
... snip ...
2011-09-20 21:47:21 2011-09-20 21:02:50 True
2011-09-20 21:02:50 2011-01-14 08:55:48 True
2011-01-14 08:55:48 2011-06-09 06:42:43 False
2011-06-09 06:42:43 2010-09-21 18:44:49 True
2010-09-21 18:44:49 2010-09-17 22:31:14 True
... snip ...
}}}

In this particular query, only one item is out of order; I've also seen queries where most of the items are out of order. I am using haystack 1.2.X, xapian-haystack master.