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.
Asked
Active
Viewed 474 times
1

Marius Miliunas
- 1,023
- 18
- 34
-
Did You find some easy solution for this issue? I have the same problem. – pWoz Oct 10 '14 at 09:50
-
Is there any solution to this problem yet? – Animesh Sharma Dec 18 '15 at 12:11
-
Does this answer your question? [Is it possible in solr to specify an ordering of documents](https://stackoverflow.com/questions/19813548/is-it-possible-in-solr-to-specify-an-ordering-of-documents) – Ahmad Abdelghany Oct 17 '22 at 12:03
1 Answers
1
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).

Persimmonium
- 15,593
- 11
- 47
- 78
-
But is there any sort order that can be passed to query which will tell solr to sort results in same order like in query? – pWoz Oct 10 '14 at 09:58
-