Jens,

  > I just tried and I'm afraid I couldn't reproduce your problem here (with
aaf trunk).  ...
  > Could you please try the lates aaf from trunk to see if it fixes your
problem?


Same problem after installing the lasted version (262) of aaf  : the custop
analyzer I pass as an aaf parameter is not used.

As a quick test, I tried using the "No Stop Word" custom  analyzer as
documented @
http://projects.jkraemer.net/acts_as_ferret/wiki/AdvancedUsage
on a simple LUT table/model, to no avail.
I tried the new syntax with the same wrong result.

Setup :

  * I've installed the latest trunk version of aaf (262)
  * killed + restarted a (new) DrB server
      $ ./script/ferret_server -e production start
  * checked the Ferret version :
      $ gem list ferret   ==> ferret (0.11.4)


Test :

I created a record where the name is a default stop word
   >> Country.find 11

      Country Load (0.000388)   SELECT * FROM countries WHERE
(countries.`id` = 11)
    => #<Country id: 11, name: " the">

model, way 1 :

  class Country < ActiveRecord::Base
      acts_as_ferret( { :fields => [:name] }, { :analyzer =>
Ferret::Analysis::StandardAnalyzer.new( []) } )
  end


model, way 2 :

class Country < ActiveRecord::Base
acts_as_ferret(
    :fields => [:name] ,
    :remote => true,
    :ferret =>  {:analyzer => Ferret::Analysis:: StandardAnalyzer.new([]) }
     )
end



PROBLEM : in both cases it doesn't find any record where the name is 'the'


 >> reload! ; Country.*rebuild_index*  ; Country.*find_by_contents*(" the")


 >> reload! ; Country.rebuild_index  ; Country.find_by_contents ("the")
 Reloading...
 Asked for a remote server ? true, ENV["FERRET_USE_LOCAL_INDEX"] is nil,
looks like we are not the server
 Will use remote index server which should be available at
druby://localhost:9010
 default field list: [:name]
 Query: the
 total hits: 0, results delivered: 0
 => #<ActsAsFerret::SearchResults:0x324ab3c @per_page=0, @current_page=nil,
 @total_hits=0, @results=[], @total_pages=0>




I tried with my custom analyser (from the previous message), with the same
wrong result.


So, it looks like aaf is not using the custom analyzer I declared in the
model.
It doesn't make any sense to me.



Alain Ravet
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to