tags:

views:

51

answers:

1

I have a problem that i want to get total count of matched text in solr. but when i want to perform search using solr i have to set max rows parameter. can anybody explain how i could get the total matched count using solr efficiently?

+2  A: 

You can get the total result count, independently from max rows defined, through the numFound attribute in the Solr response.

Mauricio Scheffer
can we the total count of documents where that search term exists..
Ahsan Iqbal
@Ahsan: like I said, use the numFound attribute.
Mauricio Scheffer
@Mauricio Scheffer: i think that if we search some term like "Contents:risk" the numFound will tell us how many times this term exists in all the lucene indexed documents right? but can we get the total count of lucene indexed documents having the search term no matter one indexed document contains search term more than once..
Ahsan Iqbal
@Ahsan: numFound counts documents, not occurrences.
Mauricio Scheffer
thank you very much for ur responses
Ahsan Iqbal