Problems with Ferret 0.9.0


#1

Hi,

I upgraded from 0.3.2 to 0.9.0, and now my old search code doesn’t work
anymore. I get a lot of ArgumentErrors, for example:

“query.add_clause(Search::BooleanClause.new(query_parser.parse(term),
Search::BooleanClause::Occur::MUST))”
raises:
ArgumentError (wrong number of arguments (2 for 0))

“index_searcher.search_each(query)”
raises:
ArgumentError (wrong number of arguments (1 for 2))

These shouldn’t happen according to the Api doc.

You can see the code here:
http://rforum.andreas-s.net/trac/file/trunk/app/models/search_ferret.rb

Andreas


#2

Hi Andreas,

Thanks for bringing this to my attention. I hadn’t added
BooleanClauses yet. They’ll be in the next version. In the mean time,
I recommend you use the BooleanQuery#add_query method.

Cheers,
Dave