Question

How to get all the rows returned from the solr instead of getting only 10 rows?

Was it helpful?

Solution

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.

OTHER TIPS

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

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

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top