Carl Youngblood
2005-Dec-14 01:55 UTC
[Ferret-talk] undefined method `add'' for Ferret::Search::BooleanQuery
Up to now in my ferret development I have been using simple single-word strings as my search queries. I just now am trying to increase the complexity of my queries. When I was passing a single word with no spaces in my index searches, like so: count = index.search_each(''testing'') do |d, s| ... end everything worked fine. But now when I do something like this: count = index.search_each(''contents:"testing|trucks"'') do |d, s| ... end I get the following error: undefined method `add'' for #<Ferret::Search::BooleanQuery:0x3787b10> Trace is: c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.3.1/lib/ferret/search/multi_phrase_query.rb:170:in `rewrite'' c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.3.1/lib/ferret/search/multi_phrase_query.rb:169:in `each'' c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.3.1/lib/ferret/search/multi_phrase_query.rb:169:in `rewrite'' c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.3.1/lib/ferret/search/index_searcher.rb:165:in `rewrite'' c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.3.1/lib/ferret/search/query.rb:50:in `weight'' c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.3.1/lib/ferret/search/index_searcher.rb:104:in `search'' c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.3.1/lib/ferret/index/index.rb:606:in `do_search'' c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.3.1/lib/ferret/index/index.rb:303:in `search_each'' c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.3.1/lib/ferret/index/index.rb:302:in `synchronize'' c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.3.1/lib/ferret/index/index.rb:302:in `search_each'' #{RAILS_ROOT}/app/models/resume.rb:40:in `search'' #{RAILS_ROOT}/app/controllers/search_controller.rb:14:in `index'' Is this a known bug? Thanks, Carl
David Balmain
2005-Dec-14 03:00 UTC
[Ferret-talk] undefined method `add'' for Ferret::Search::BooleanQuery
On 12/14/05, Carl Youngblood <carl at youngbloods.org> wrote:> Up to now in my ferret development I have been using simple > single-word strings as my search queries. I just now am trying to > increase the complexity of my queries. When I was passing a single > word with no spaces in my index searches, like so: > > count = index.search_each(''testing'') do |d, s| > ... > end > > everything worked fine. But now when I do something like this: > > count = index.search_each(''contents:"testing|trucks"'') do |d, s| > ... > end > > I get the following error: > > undefined method `add'' for #<Ferret::Search::BooleanQuery:0x3787b10> > > Trace is: > <snip> > Is this a known bug?Hi Carl, There are currently no known bugs in Ferret. If I know about it I''ll fix it as soon as possible. This was an unknown bug which has now been swatted. You can get the latest from svn. I might put out another release soon. Find me a couple more bugs and I definitely will. Dave> Thanks, > > Carl > > _______________________________________________ > Ferret-talk mailing list > Ferret-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/ferret-talk >
Carl Youngblood
2005-Dec-14 04:14 UTC
[Ferret-talk] undefined method `add'' for Ferret::Search::BooleanQuery
On 12/13/05, David Balmain <dbalmain.ml at gmail.com> wrote:> fix it as soon as possible. This was an unknown bug which has now been > swatted. You can get the latest from svn. I might put out another > release soon. Find me a couple more bugs and I definitely will.Thanks Dave. I''ll keep an eye out. In the mean time I''ve manually patched my code. Carl