Exporting whole query results
One of the features of search engines such as Solr that users frequently ask about is the ability to pull the data from the search engine in some form. I'm not talking about a few hundred results returned by a query, but about all the documents that are indexed in a particular core or collection. With the new releases of Solr, we have the ability to scroll through the results and with some effort, we will be able to export all the results. However, with the release of Solr 4.10, we were also given a possibility of exporting fully sorted query results at once. This recipe will show you how to do that.
How to do it...
Let's assume that we have an index that contains book names and the number of votes users have given to those books and that our hypothetical index is large. What we would like to do is export all the books matching a particular query along with the number of votes they have to a separate file. The results of such a query can be massive...