Mercurial > moin > 1.9
changeset 1481:d92f2261387e
disable xapian hitcount estimation if index has multiple pagerevisions
author | Franz Pletz <fpletz AT franz-pletz DOT org> |
---|---|
date | Thu, 24 Aug 2006 16:08:03 +0200 |
parents | c222d149e93f |
children | 546ec510caa1 |
files | MoinMoin/search/builtin.py |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/search/builtin.py Thu Aug 24 15:50:35 2006 +0200 +++ b/MoinMoin/search/builtin.py Thu Aug 24 16:08:03 2006 +0200 @@ -421,13 +421,16 @@ hits = self._filter(hits) # when xapian was used, we can estimate the numer of matches - if self.request.cfg.xapian_search: + # XXX: hits can't be estimated by xapian with historysearch enabled + if not self.cfg.xapian_index_history and \ + self.request.cfg.xapian_search: self.sort = None mset = self._xapianMset estimated_hits = ( - (mset.get_matches_estimated() == mset.get_matches_upper_bound() and - mset.get_matches_estimated() == mset.get_matches_lower_bound()) and - '' or 'about', + (mset.get_matches_estimated() == mset.get_matches_upper_bound() + and + mset.get_matches_estimated() == mset.get_matches_lower_bound()) + and '' or 'about', mset.get_matches_estimated()) else: estimated_hits = None