can't reproduce this on windows and ferret 0.10.9.
The following snippet gives these results:
TopDocs: total_hits = 1, max_score = 0.878416 [
0: 0.878416
]
TopDocs: total_hits = 2, max_score = 0.500000 [
1: 0.500000
2: 0.500000
]
TopDocs: total_hits = 1, max_score = 0.702733 [
2: 0.702733
]
TopDocs: total_hits = 0, max_score = 0.000000 [
]
TopDocs: total_hits = 0, max_score = 0.000000 [
]
Snippet:
require 'rubygems'
require 'ferret'
include Ferret
i = Ferret::I.new
["While you were out pet care", "Eastside dog walker",
"Top dawg dog walker"].each {|text| i << text }
puts i.search('pet')
puts i.search('dog')
puts i.search('dawg')
puts i.search('cat')
# Let's add some more strings to the index.
["While you were out pet care", "Eastside dog walker",
"Top dawg dog walker"].each {|text| i << text }
["While you were out pet care", "Eastside dog walker",
"Top dawg dog walker"].each {|text| i << text }
puts i.search('cat')
---------------------
So things seem to work as expected.
You might try two things before further investigation:
1. run the script outside of irb: Does it give you the same (wrong) results?
2. gem uninstall ferret and gem install ferret to make sure you are using solely the latest version of ferret
Cheers,
Jan
_______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

