On Fri, Apr 24, 2009 at 7:38 PM, Raju444us <gudipal...@gmail.com> wrote:
> > Thanks,Yonik for quick reply. But How can I override the relevancy score > with > my fieldScore for that document when I get back the results. If possible an > example code is helpfull. > > Note: Iam storing the fieldScore. so that I can retrieve the score. > There are a couple of things here: 1. If you have a fixed score for each document in the index, then you can simply sort on that field instead of using Solr's default sort=score desc as Yonik suggested. No need to bother with Solr's relevancy score at all. If only some of your documents have a fixed score, then: 1. The score for a document is computed based on the query and the document's relevancy for that query. This score is used to order the results (by default). But you are fixing a value for document. So do you want to fix the document's position regardless of the query? Or do you just want to boost the document itself? 2. The range of the computed score is not fixed, it varies based on the query. So for your fixed score, the document may wind up at the top, middle or even at the bottom. So it is not clear what you will achieve by fixing your score. -- Regards, Shalin Shekhar Mangar.