I’m using this pattern:
http://localhost:8983/solr/select/?q=hello&wt=json&json.wrf=?&indent=true&hl=true&hl.fl=title
It returns like:
?({
"response":{"numFound":100,"start":0,"docs":[
{
"id":"1234",
"title":"Something Hello"
..
..
},
... bla bla, to the end
]
})
It is obviously showing 100 records found in header but the items { bla bla... } really are just 10 inside. It is really the 100 item in the Index. IT MUST SHOW REALLY EXACTLY 100.
Is it showing just first 10 item?
What did i miss in the pattern?
100 is the total number of records that Solr found, but by default it only returns 10 at a time.
Try adding
&rows=100to the URL to fetch all 100 results at once.Edit: In a real app, you probably want to fetch results in pages, so that you don’t run out of memory trying to fetch a zillion results at once. In that case, you combine the
startandrowsoptions.For example to fetch 20 results at a time:
First request would use
&start=0&rows=20Second request would use
&start=20&rows=20… and so on, until you have fetched all the results.
This is similar to using the
OFFSETandLIMITkeywords in SQL, if you are familiar with those.