diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-01-19 12:34:10 +0000 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-01-19 12:34:10 +0000 |
commit | 64381d5786c883a41fad3b099a3059e97f96445e (patch) | |
tree | 4da15c72030dcfa19081532a87e2922ae6604f7e /app/controllers/application_controller.rb | |
parent | 8f03bff23b7c343a726ac7082fbc54dc80dc478e (diff) |
Disable Xapian wildcards
Do not use FLAG_WILDCARD or FLAG_PARTIAL anywhere, because wildcard
searches can crash the whole server as per http://trac.xapian.org/ticket/350
(e.g. http://www.whatdotheyknow.com/body/search_ahead?query=app will
crash the server prior to this commit.)
This is a temporary fix while we investigate the possibilities of
the set_max_wildcard_expansion() method, which should make it possible
to alleviate this issue.
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 0c8544932..c639bece1 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -387,7 +387,7 @@ class ApplicationController < ActionController::Base ActsAsXapian.query_parser.default_op = Xapian::Query::OP_OR user_query = ActsAsXapian.query_parser.parse_query( query, - Xapian::QueryParser::FLAG_LOVEHATE | Xapian::QueryParser::FLAG_PARTIAL | + Xapian::QueryParser::FLAG_LOVEHATE | Xapian::QueryParser::FLAG_SPELLING_CORRECTION) xapian_requests = ActsAsXapian::Search.new([model], query, options, user_query) ActsAsXapian.query_parser.default_op = old_default_op |