On 4/10/13 12:17 PM, Per Steffensen wrote:
"number of documents found" can be found in a field called "numFound"
in the response.
If you do use SolrJ you will likely have a QueryResponse qr and can
just do a qr.setNumFound().
qr.getResults().getNumFound() :-)
If you use do not use SolrJ try to add e.g. wt=json to your search
query to get the response in JSON. Find the numFound field in the
readable JSON response - it should be at "response.numFound". If in
javascript with jQuery something like this should work:
$.getJSON(search_url,
function(data) {
... data.response.numFound ...
}
)
Go figure who to extract it in javascript without jQuery
Regards, Per Steffensen
On 4/5/13 3:20 PM, Alexandre Rafalovitch wrote:
I'd add rows=0, just to avoid the actual records serialization if
size is
all that matters.
Regards,
Alex.
Personal blog: http://blog.outerthoughts.com/
LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
- Time is the quality of nature that keeps events from happening all at
once. Lately, it doesn't seem to be working. (Anonymous - via GTD
book)
On Fri, Apr 5, 2013 at 8:26 AM, Jack Krupansky
<j...@basetechnology.com>wrote:
Query for "*:*" and look at the number of documents found.
-- Jack Krupansky
-----Original Message----- From: Ranjith Venkatesan
Sent: Friday, April 05, 2013 2:06 AM
To: solr-user@lucene.apache.org
Subject: Solr Collection's Size
Hi,
I am new to solr. I want to find size of collection dynamically via
solrj.
I
tried many ways but i couldnt succeed in any of those. Pls help me with
this
issue.