aboutsummaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
authorRobin Houston <robin.houston@gmail.com>2012-01-19 12:34:10 +0000
committerRobin Houston <robin.houston@gmail.com>2012-01-19 12:34:10 +0000
commit64381d5786c883a41fad3b099a3059e97f96445e (patch)
tree4da15c72030dcfa19081532a87e2922ae6604f7e /vendor
parent8f03bff23b7c343a726ac7082fbc54dc80dc478e (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 'vendor')
-rw-r--r--vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb b/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb
index 38bfb7c98..a5aee66b4 100644
--- a/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb
+++ b/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb
@@ -443,7 +443,7 @@ module ActsAsXapian
user_query = ActsAsXapian.query_parser.parse_query(
self.query_string,
Xapian::QueryParser::FLAG_BOOLEAN | Xapian::QueryParser::FLAG_PHRASE |
- Xapian::QueryParser::FLAG_LOVEHATE | Xapian::QueryParser::FLAG_WILDCARD |
+ Xapian::QueryParser::FLAG_LOVEHATE |
Xapian::QueryParser::FLAG_SPELLING_CORRECTION)
end
self.query = Xapian::Query.new(Xapian::Query::OP_AND, model_query, user_query)