The problem is that the query parser can generate way too big querries, for lib its a 5000 entry long query. One possible fix is this, or we can limit it in appview.py and use the number there as a estimate for the amount of hits we probably get.
=== modified file 'softwarecenter/db/database.py'
--- softwarecenter/db/database.py 2010-08-20 13:06:38 +0000
+++ softwarecenter/db/database.py 2010-09-09 21:16:30 +0000
@@ -198,6 +198,12 @@ fuzzy_query = self.xapian_parser.parse_query(search_term, xapian.QueryParser.FLAG_PARTIAL| xapian.QueryParser.FLAG_BOOLEAN)
+ # if the query size goes out of hand, omit the FLAG_PARTIAL
+ # (LP: #634449)
+ if fuzzy_query.get_length() > 1000:
+ fuzzy_query = self.xapian_parser.parse_query(
+ search_term, xapian.QueryParser.FLAG_BOOLEAN)
+ # now add categories fuzzy_query = _add_category_to_query(fuzzy_query)
return [pkg_query,fuzzy_query]
The problem is that the query parser can generate way too big querries, for lib its a 5000 entry long query. One possible fix is this, or we can limit it in appview.py and use the number there as a estimate for the amount of hits we probably get.
=== modified file 'softwarecenter /db/database. py' db/database. py 2010-08-20 13:06:38 +0000 db/database. py 2010-09-09 21:16:30 +0000
fuzzy_ query = self.xapian_ parser. parse_query( search_ term,
xapian. QueryParser. FLAG_PARTIAL|
xapian. QueryParser. FLAG_BOOLEAN) get_length( ) > 1000: parser. parse_query( QueryParser. FLAG_BOOLEAN)
fuzzy_ query = _add_category_ to_query( fuzzy_query) fuzzy_query]
--- softwarecenter/
+++ softwarecenter/
@@ -198,6 +198,12 @@
+ # if the query size goes out of hand, omit the FLAG_PARTIAL
+ # (LP: #634449)
+ if fuzzy_query.
+ fuzzy_query = self.xapian_
+ search_term, xapian.
+ # now add categories
return [pkg_query,