Hi Bira, this just sounds like your search is getting no hits. The ConstantScoreQuery was giving everything a minimum score but no other hits increased the score. Now you've removed the only thing that was providing a score, so it's dropped to 0.
Make sure your indexing and searching is working correctly. Try the ferret-browser tool to review your index - see if it's what you expect (i.e: has the terms you're searching for). If all this is working as expect, try posting a snip of your code where you define the index, and where you do a search and we should be able to help. John. -- http://www.brightbox.co.uk - UK/EU Ruby on Rails Hosting http://johnleach.co.uk On Fri, 2008-02-22 at 16:18 -0300, Bira wrote: > 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. > _______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

