On 8/28/06, Caspar <waspfactory at ggmmmmmmail.commmm>
wrote:> Hi new version of ferret and acts as ferret have sorted out the scary
> glibc *** linked list pointer errors, thank god! New version are good
> but some searches are still not working. It is mostly the stop words
> ones. For example the "For Sale/Free/Swap" fails but works when
"for" is
> stripped out. I have read all the recent posts regarding this issue and
> failed to get it to work in a clean way. I tried:
>
> acts_as_ferret :fields=>
[''short_description'',''section''], :analyzer
=>
> Ferret::Analysis::StandardAnalyzer.new([])
>
> and rebuilt my index but same behavior as before. There seems to have
> been alot of effort put into tracking down a solution to this problem so
> has one been found that i''m missing? I''m using ferret
0.10.1 and
> bleeding edge acts_as_ferret (is this the only version that works with
> ferret 0.10.1?).
> Also a search for "Film/Theatre" fails while lots of other
serahces with
> /''s in them succeed, is there a reason why this might be happening
?
Hi Caspar,
I''m not sure what you are trying to do with the
"Film/Theatre" search.
If you are trying to Film or Theatre you should search for
"Film|Theatre". Also, could you please give an example of a search
that doesn''t work including the data that is entered. For example;
irb(main):001:0> require ''rubygems''
=> true
irb(main):002:0> require ''ferret''
=> false
irb(main):003:0> include Ferret
=> Object
irb(main):004:0> i = I.new
=> #<Ferret::Index::Index:0xb7b8d76c @default_field=:*,
@auto_flush=false, @open=true, @options={:default_field=>:*,
:dir=>#<Ferret::Store::RAMDirectory:0xb7b8d654>,
:analyzer=>#<Ferret::Analysis::Analyzer:0xb7b8d17c>}, @mon_owner=nil,
@id_field=:id, @reader=nil, @mon_waiting_queue=[],
@analyzer=#<Ferret::Analysis::Analyzer:0xb7b8d17c>,
@default_input_field=:id,
@dir=#<Ferret::Store::RAMDirectory:0xb7b8d654>,
@mon_entering_queue=[], @qp=nil, @writer=nil, @mon_count=0>
irb(main):005:0> i << "For Free"
=> nil
irb(main):006:0> i << "For Sale"
=> nil
irb(main):007:0> i << "For Swap"
=> nil
irb(main):008:0> i.search(''"For Free|Sale|Swap"'')
=> #<struct Ferret::Search::TopDocs total_hits=3, hits=[#<struct
Ferret::Search::Hit doc=0, score=4.21639537811279>, #<struct
Ferret::Search::Hit doc=1, score=4.21639537811279>, #<struct
Ferret::Search::Hit doc=2, score=4.21639537811279>],
max_score=4.21639537811279>
Cheers,
Dave