The ReRankQuery re-ranks the Top N documents of the main query based on a query. Rather then the CustomScoreQuery you may want to look at ReRanking by a Function Query using the FunctionQParserPlugin. This would allow you to directly control the ReRankScore for the top N documents.
Writing your own RankQuery should be the last resort if you can't make a Function Query do what you need to do. Joel Bernstein http://joelsolr.blogspot.com/ On Thu, Sep 17, 2015 at 10:44 PM, Ajinkya Kale <kaleajin...@gmail.com> wrote: > Hi all, > > I am new to Solr. I have a QParser plugin which uses an implementation > of CustomScoreQuery to provide custom score for each document. > Is there a way I can use the same plugin to provide score for top N > documents after an initial query/sort ? > I looked at the ReRankQParserPlugin but it looks lot more involved to write > a custom RankQuery implementation. So I was thinking if I can reuse my > existing CustomScoreQuery implementation to provide score for top N > documents to rerank. > > On a side note, is there a place where the ReRankQParserPlugin is explained > in detail ? > > --aj >