similar to: undefined method `add'' for Ferret::Search::BooleanQuery

Displaying 20 results from an estimated 6000 matches similar to: "undefined method `add'' for Ferret::Search::BooleanQuery"

2006 Mar 29
1
Problems with Ferret 0.9.0
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
2005 Nov 22
1
Ferret NoMethodError
Using the current ferret gem (on Win-XP): irb(main):001:0> require ''ferret'' c:/ruby/lib/ruby/1.8/fileutils.rb:950: warning: already initialized constant OPT_TABLE => true irb(main):002:0> include Ferret => Object irb(main):003:0> index = Index::Index.new => #<Ferret::Index::Index:0x3477ba8 @qp=nil, ...> irb(main):004:0> index << "This is
2006 Sep 22
1
Query Objects vs. Query Strings
Hi .. I tried to build some query objects to get some documents from my index.. without success.. Is something wrong here? q = Ferret::Search::BooleanQuery.new q1 = Ferret::Search::TermQuery.new(:type, "movie") q2 = Ferret::Search::TermQuery.new(:name, "Indiana") q.add_query(q1, :should) q.add_query(q2, :should) Indexer.index.search_each(q) do |doc, score| puts doc end 0
2005 Dec 14
4
Is it possible to highlight search keywords in results?
I''m wondering if ferret has any built-in search/replace mechanism that I might be able to use to highlight the query data in each search result. The reason I think this would be a good idea is that I could end up having to practically duplicate the ferret query parser just to interpret the query so that I can figure out how to highlight the keywords in the search results. Just in case
2006 Mar 31
3
undefined method `<=>'' for :id:Symbol
Upgrading to 0.9.0, I have the following error. Anybody? c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.0/lib/ferret/index/term.rb:35:in `<=>'': undefined method `<=>'' for :id:Symbol (NoMethodError) from c:/ruby/lib/ruby/gems/1.8/gems/ferret-0.9.0/lib/ferret/index/term_infos_io.rb:263:in `get_index_offset'' from
2006 Jan 05
0
Java Lucene compatibility?
I haven''t dug into this yet, but wanted to report it. I''ve built an index with Java Lucene (1.9, from svn trunk) and then trying to search it with Ferret and getting this: /usr/lib/ruby/site_ruby/1.8/ferret/index/term_buffer.rb:31:in `read'': undefined method `name'' for nil:NilClass (NoMethodError) from /usr/lib/ruby/site_ruby/1.8/ferret/index/
2006 Mar 29
5
EdgeRails: "undefined method `weight'' for #<Hash:
Hi all, I was playing with the sample project found on the Wiki at http://wiki.rubyonrails.com/rails/pages/HowToIntegrateFerretWithRails , and everything was working fine, ... till I moved to EdgeRails : undefined method `weight'' for #<Hash:0x22c7150> (full error thread below) Any idea? Alain
2006 Sep 05
4
Ferret 0.10.2 - Index#search_each() and :num_docs
Hi, I seem to be having trouble getting more than 10 hits from Index#search_each since upgrading to 0.10.2 (ie, this was working in 0.9.4). Maybe a bug, as the #search_each doesn''t seem to use the options parameter any more ? Thanks, Neville =========================================== require ''rubygems'' require ''ferret'' p Ferret::VERSION idx =
2007 Apr 13
5
[Ferret] Serious memory leak on Joyent / TextDrive / Solaris
There is serious memory leak bug in ferret. I''m having this error on TextDrive Container (aka. Joyent Accelerators) OpenSolaris with Ferret 0.11.4 It happens while searching for some terms with accented or special characters. This makes ferret to allocate lots of memory (usually reaching 3+ GB) and failing if another query like this is executed. Any ideas on that, could this be locale
2005 Dec 02
4
How to get the count of matching documents
I''m trying to generate a rails pagination helper for some ferret search results, and I need to know how many total matches there are to my search query. I don''t see an obvious way of finding this. Any help would be appreciated. Thanks, Carl Youngblood
2006 Jun 11
3
Bus Error with Ferret 0.9.3 using the BooleanQuery api
Hey guys, I''ve been trying out ferret 0.9.3 on my powerbook this weekend and I''ve been triggering ''bus errors'' when using the Query API. If I programmatically build up strings, it works just fine. There''s some more information available in the trac ticket http://ferret.davebalmain.com/trac/ticket/62 Is anyone successfully using the Query API on
2006 Jan 19
2
Simple Ferret Questions
I am trying to use Ferret for searching for users based on first and last name. In my index, I am adding the first_name, last_name, and a full_name which is basically "#{first_name} #{last_name}". I am searching the index using something like the following query: INDEX.search_each(%Q/first_name:#{query}* OR last_name:#{query}* OR full_name:#{query}*/) do |doc, score| The problem I am
2008 Mar 05
0
Index Searcher Causes GC Memory Error: "irb: double free or corruption"
My linux Ruby application is using Ferret 0.11.4. I created my own class IndexSearcher to contain the Searcher of multiple directories. If I do not have the searcher.close called, the end of runner/console or runner/server will pop out with system error: *** glibc detected *** irb: double free or corruption (fasttop): 0x0a51d6c0 *** ======= Backtrace: ========= /lib/libc.so.6[0x638ac1]
2006 Aug 04
5
A couple of ferret 0.9.4 exceptions
Hi Dave, I am using ferret at my site http://gifthat.com and I just had a few exceptions pop up. I don''t have a way to reproduce them, but my site just was listed on lifehacker.com and these issues have popped up under multiple concurrent users (only twice though which I think isn''t too bad). I am using two lighttpd instances both with read/write access to the index: 1) Error
2005 Dec 08
2
Confusing lock problem in rails
I have a model class in rails that has a class variable that is a ferret index. For some reason, the methods in my class that refer to the class variable are getting lock conflicts. Can anybody see any obvious reason why? I notice that it keeps leaving a lock file in the index directory. I thought auto_flush was supposed to remove the lock automatically after every operation. Is there
2007 Feb 16
1
Highlight raises Segmentation Fault Error in Ferret 0.10.9 i
Hi Everyone, I am currently in process of upgrading Ferret 0..9.1 to Ferret 0.10.9 with Ruby 1.8.4 in windows platform. I am trying to use search highlight feature on index_searcher subject = index_searcher.highlight("subject:(blah blah)", 0, :field => :content, :pre_tag = "<span
2006 Jun 29
13
find_by_contents not returning SearchResults?
The acts_as_ferret documentation says find_by_content returns an instance of SearchResults, but I see this error when I try to use the results. undefined method `total_hits'' for []:Array Here is the link to the documentation: http://projects.jkraemer.net/acts_as_ferret/rdoc/classes/FerretMixin/Acts/ARFerret/ClassMethods.html#M000010 But here is the actual code: result =
2007 Apr 09
5
highlight crashes
I am trying to use highlight, but I am getting this kind of thing: /usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.4/lib/ferret/index.rb:197:in `highlight'': IO Error occured at <except.c>:93 in xraise (IOError) Error occured in index.c:1222 - lazy_df_get_bytes len = -5, but should be greater than 0 from
2007 Mar 12
5
index.rb:384 [BUG]
Hi folks, I''ve working and playing with acts_as_ferret and follow this fantastic tutorial: http://www.railsenvy.com/2007/2/19/acts-as-ferret-tutorial When I try to implement the field storage tip, it crash. So, I try to make it via script/console: 1. I have a simple model called Articles: class Article < ActiveRecord::Base acts_as_ferret :fields =>
2006 Sep 15
1
Custom analyzer not invoked?
Hello, I''m trying to define my own analyzer by doing something like: #----------------------------------------------------- require ''ferret'' include Ferret class MyAnalyzer < Analysis::Analyzer def token_stream(field, str) # Display results of analysis puts ''Analyzing: field:%s str:%s'' % [field, str] t =