]> git.cworth.org Git - sup/commitdiff
make conjunctive queries the default, and stop ignoring stopwords
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Sat, 7 Jul 2007 14:30:13 +0000 (14:30 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Sat, 7 Jul 2007 14:30:13 +0000 (14:30 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@479 5c8cc53c-5e98-4d25-b20a-d8db53a31250

lib/sup/index.rb

index c436ffdbe69654fe296d123db1285ef6ba0deee4..9ce4858374d4f9e08cfcc067f164ebca3f23602e 100644 (file)
@@ -24,11 +24,11 @@ class Index
     @sources_dirty = false
 
     wsa = Ferret::Analysis::WhiteSpaceAnalyzer.new false
-    sa = Ferret::Analysis::StandardAnalyzer.new Ferret::Analysis::FULL_ENGLISH_STOP_WORDS, true
+    sa = Ferret::Analysis::StandardAnalyzer.new [], true
     @analyzer = Ferret::Analysis::PerFieldAnalyzer.new wsa
     @analyzer[:body] = sa
     @analyzer[:subject] = sa
-    @qparser ||= Ferret::QueryParser.new :default_field => :body, :analyzer => @analyzer
+    @qparser ||= Ferret::QueryParser.new :default_field => :body, :analyzer => @analyzer, :or_default => false
     @lock = Lockfile.new lockfile, :retries => 0, :max_age => nil
 
     self.class.i_am_the_instance self