lib/sup/xapian_index.rb in sup-0.9 vs lib/sup/xapian_index.rb in sup-0.9.1
- old
+ new
@@ -1,11 +1,11 @@
require 'xapian'
require 'set'
module Redwood
-# This index implementation uses Xapian for searching and GDBM for storage. It
+# This index implementation uses Xapian for searching and storage. It
# tends to be slightly faster than Ferret for indexing and significantly faster
# for searching due to precomputing thread membership.
class XapianIndex < BaseIndex
STEM_LANGUAGE = "english"
INDEX_VERSION = '1'
@@ -191,10 +191,10 @@
# TODO share code with the Ferret index
def parse_query s
query = {}
subs = HookManager.run("custom-search", :subs => s) || s
- subs = s.gsub(/\b(to|from):(\S+)\b/) do
+ subs = subs.gsub(/\b(to|from):(\S+)\b/) do
field, name = $1, $2
if(p = ContactManager.contact_for(name))
[field, p.email]
elsif name == "me"
[field, "(" + AccountManager.user_emails.join("||") + ")"]