[Xapian-discuss] Search term not found.

Olly Betts olly at survex.com
Mon Sep 20 03:53:13 BST 2004


On Wed, Sep 15, 2004 at 04:51:56PM +0100, Olly Betts wrote:
> It appears that the database is inconsistent - the document is listed in
> the posting lists for at least 3 terms, but there seems to be no entry
> in the record table for it (the record table holds the document data).

I think this isn't a database inconsistency after all.  I think it's
very likely it's caused by the same bug that Michiel Roding hit.

Jim - Could you try the attached patch, or the latest CVS snapshot of
xapian-core and see if that fixes the problem?

Cheers,
    Olly
-------------- next part --------------
--- matcher/multimatch.cc	9 Sep 2004 20:47:25 -0000	1.171
+++ matcher/multimatch.cc	20 Sep 2004 02:18:00 -0000	1.172
@@ -937,7 +937,7 @@ MultiMatch::get_mset(Xapian::doccount fi
 	// Remove unwanted trailing entries
 	if (maxitems == 0) {
 	    items.clear();
-	} else {
+	} else if (items.size() > first + maxitems) {
 	    if (sort_bands <= 1)
 		nth_element(items.begin(),
 			    items.begin() + first + maxitems,


More information about the Xapian-discuss mailing list