From 93b6a1a423dfd8331e1bfa4b43b55197b17e23cb Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Thu, 31 Jul 2008 14:48:32 +0000 Subject: #7234 Request all the results so we get an accurate entry count. --- diff --git a/src/olpc/datastore/xapianindex.py b/src/olpc/datastore/xapianindex.py index 888bd26..e8a5ee5 100644 --- a/src/olpc/datastore/xapianindex.py +++ b/src/olpc/datastore/xapianindex.py @@ -467,7 +467,8 @@ class IndexManager(object): if order_by: order_by = order_by[0] else: order_by = None - results = ri.search(q, start_index, end_index, sortby=order_by) + results = ri.search(q, start_index, end_index, sortby=order_by, + checkatleast=sys.maxint) count = results.matches_estimated # map the result set to model.Content items -- cgit v0.9.1