Question

Using SOLR 3.6 I have a query like ?fq=nid:(4 6 2 3 1) and the results are coming back in a new order like (6 4 3 2 1) instead of the order passed in. Is there a way without using boosts to get the results it the same order as I passed in.

Was it helpful?

Solution

Docs are returned according to the sort param. By default that is by score. In order to set a different sort you just have to pass a desired sort order. Can you do that? If you cannot, then probably the only easy way is as you say, boosting the docs accordingly and leaving score sort.

But, fq is a filter, that does not have any effect on the score of docs, you would need to boost on the q param (or other places but that is the easiest).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top