Hi,

i want to sort my documents by a given order. The order is defined by a list of ids.

My current solution is:

list of ids: 15, 5, 1, 10, 3

query: q=*:*&fq=(id:((15) OR (5) OR (1) OR (10) OR (3)))&sort=query($idqsort) desc,id asc&idqsort=id:((15^5) OR (5^4) OR (1^3) OR (10^2) OR (3^1))&start=0&rows=5

Do you know an other solution to sort by a list of ids?

Thanks!

Johannes

Reply via email to