On Thu, Apr 23, 2009 at 1:19 PM, Raju444us <gudipal...@gmail.com> wrote: > I have a requirement.I index a field "id" and a calculated score for that > field named "fieldScore". > > Note:I have many other fields which are also indexed.But only for this id > field i want a custom calculated score. > > So when I search for that id q="id:1234".What I want is in the results if I > use result.getScore() i should get the indexed score(fieldName :fieldScore) > for the id instead of the default solr score.
You can sort directly on the fieldScore field (no need to make the relevancy score equal to the fieldScore). You can also use fieldScore as part or all of the relevancy score using function query. q={!func}fieldScore -Yonik http://www.lucidimagination.com