Hi all, I need to execute a Solr query in two steps, executing in the first step a generic limited-results query ordered by relevance, and in the second step the ordering of the results of the first step according to a given sorting criterion (different from relevance).
This two-steps query is meaningful when the query terms are so generic in such a way that the number of matched results exceeds the wanted number of results. In such circumstance, using single-step queries with different sorting criteria has a very confusing effect on the user experience, because at each change of sorting criterion the user gets different results even if the search query and the filtering conditions have not changed. On the contrary, using a two-steps query where the sorting order of the first step is always the relevance is more acceptable in case of large number of matched results because the result set would not change with the sorting criterion of the second step. I am wondering if such a two-steps query is achievable with a single Solr query, or if I am obliged to execute the sorting step of my two-steps query out of Solr (i.e.:in my application). Another possibility could be the development of a Solr plugin, but I am afraid of the possible effects on the performances. I am using Solr 3.4.0 Thanks in advance for your kind help. Fabio