: Background: Basically, I have added a new feature to Solr after I got the : source code. Similar to the we get "score" in the resultset, I am now able : to get position (or ranking) information of each document in the list. i.e : if there are 5 documents in the result set, each of them has its position : information if you add "fl=*,position" to the query.
w/o more information about how/where you add this information, it's going to be really hard to give you suggestions on how to fix your problem. : solr is on a cloud (as a master), the result set is some kinda shuffled and : position information is incorrect. In general the thing to keep in mind is that when doing a distributed query, each node is responsible for providing data about the results, and then a single node (which ever one your client/browser is connected to) acts as an agregator to merge that information. How that merging happens is specific to the information, and in most cases multiple (pipelined) requests are made to the individual shards. for example: a request to search for X, sorted by Y, and faceting on field Z requires two requests to every shard: the first request gets the docIds and value of "Y" for the first N docs from each shard, as well as the top ranking facet values and their counts for field Z. Then the agregator looks at the Y values to figure out which docs from which shards should be in the final result, and it looks at the facet values to see which ones should be in the final result, and then it issues a second request to each shard in which it asks for the "fl" of those specific docs, and the final counts for those specific facet values, and then the final response is built up and returned from the client. so depending on what you really mean in terms of "position" in an agregated request like this, you need to make sure your custom code is running in the right place -- that may mean having logic that runs on the individual shards, as well as merge logic on the aggregator, or it may mean logic thta *only* runs on the aggregator, based on information already available. the details of what you are trying to do, and how you are currently attempting to do it, matter a lot. -Hoss