Ticket #464: bug-464-fix.patch
File bug-464-fix.patch, 1.1 KB (added by , 15 years ago) |
---|
-
matcher/multimatch.cc
318 318 { 319 319 DEBUGCALL(MATCH, void, "MultiMatch::get_mset", first << ", " << maxitems 320 320 << ", " << check_at_least << ", ..."); 321 if (check_at_least < maxitems) check_at_least = maxitems; 321 { 322 Xapian::doccount docs = db.get_doccount(); 323 maxitems = min(maxitems, docs); 324 check_at_least = min(check_at_least, docs); 325 check_at_least = max(check_at_least, maxitems); 326 } 322 327 323 328 if (!query) { 324 329 mset = Xapian::MSet(); // FIXME: mset.get_firstitem() will return 0 not first … … 893 898 = items.size(); 894 899 if (collapser && matches_lower_bound > uncollapsed_lower_bound) 895 900 uncollapsed_lower_bound = matches_lower_bound; 896 } else if (docs_matched < check_at_least) {901 } else if (docs_matched + collapser.get_dups_ignored() < check_at_least) { 897 902 // We have seen fewer matches than we checked for, so we must have seen 898 903 // all the matches. 899 904 LOGLINE(MATCH, "Setting bounds equal");