How to get all the rows returned from the solr instead of getting only 10 rows?
4 Answers
You can define how many rows you want (see Pagination in SolrNet), but you can't get all documents. Solr is not a database. It doesn't make much sense to get all documents in Solr, if you feel you need it you might be using the wrong tool for the job.
This is also explained in detail in the Solr FAQ.

- 98,863
- 23
- 192
- 275
-
You might be right that you can't get all documents from SOLR without a query, but it is possible to get all results from a search without specifying a maximum. See my answer below. – René Aug 08 '12 at 10:51
-
@Gunder: I recommend you take another look at the question and your answer. The documentation you link is for fetching all facets, not all results. You can't fetch all results. – Mauricio Scheffer Aug 08 '12 at 13:49
As per Solr Wiki,
About the row that query returns,
The default value is "10", which is used if the parameter is not specified. If you want to tell Solr to return all possible results from the query without an upper bound, specify rows to be 10000000 or some other ridiculously large value that is higher than the possible number of rows that are expected.
refer this https://wiki.apache.org/solr/CommonQueryParameters

- 20,751
- 8
- 75
- 78
You can setup rows=x, where x is the desired number of doc in the query url.
You can also get groups of 10 doc, by looping over the founds docs by changing start
value and leaving row=10

- 1,506
- 1
- 18
- 31
Technically it is possible to get all results from a SOLR search. All you need to do is to specify the limit as -1.

- 9,880
- 4
- 43
- 49
-
I recommend you take another look at the question and your answer. The documentation you link is for fetching all **facets**, not all **results**. You can't fetch all results. – Mauricio Scheffer Aug 08 '12 at 13:48
-
@MauricioScheffer Ah you're right about the documentation, I'm sorry about that. I removed the link. I also see that in my own code I use grouping combined with a limit of -1, which for me gives me all results. However, it might be that SOLR interprets the -1 as something else per default, 1000 for example. I can't say for sure as I can't find any documentation about it. However it does work me to set the group limit to -1, and that gives me all results (Currently 440+ results) – René Aug 16 '12 at 09:05