[Namazu-users-en] Fix for broken date sorting in Field-specified searching

Stephen Wood zviwood at gmail.com
Fri Dec 3 23:22:17 JST 2010


In Namazu 2.0.20, when doing field specified searching (eg. +title:namazu),
the results are not sorted properly when date ascending or date descending
sort order is selected.  This seems to be because nmz_regex_grep_field in
nmz/re.c is not putting the date into the results list.  The following patch
seems to fix the sorting for me:

--- re.c-org    2008-03-06 10:38:09.000000000 -0500
+++ re.c    2010-12-02 22:54:23.000000000 -0500
@@ -270,6 +270,7 @@
                 return val;
                     }
                 }
+        val.data[n-1].date = data.date;
                 val.data[n-1].docid = i;
                 val.data[n-1].score = 1;  /* score = 1 */
                 val.num = n;

Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.namazu.org/pipermail/namazu-users-en/attachments/20101203/7526b621/attachment.htm>


More information about the Namazu-users-en mailing list