We're using Ferret (but not acts_as_ferret) on a project I'm working
on, and I ran into a problem with the document scores returned from
searches.

I consider myself a Ferret noob... I know a little about its API,
having read the O'Reilly shortcut, but I couldn't find a solution to
this problem there. Please allow me to explain:

It started when I noticed that all of the relevance scores for each
result were exactly the same. By reading the shortcut, I found out
that happened because a range query (with initial and final dates) was
always included in the queries passed to Ferret, and Ferret's
RangeQuery always return results with identical scores, because it
uses a ConstantScoreQuery internally.

So far, so good - I removed this range query from the application
code, as an experiment, and passed a simple string that translates
into a TermQuery to it. From what I know of Ferret, it should return
normal scores, but all of them came back as 0.

Is this a known behavior/bug? Or did I do something wrong with the
search or the indexing? I know the latter is more likely, and if
needed I can try to provide some trimmed-down example code.

-- 
Bira
http://compexplicita.wordpress.com
http://compexplicita.tumblr.com
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to