You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Ranjith Venkatesan <ra...@zohocorp.com> on 2013/04/05 08:06:35 UTC
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.
Thanks in advance
Ranjith Venkatesan
--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Collection-s-Size-tp4054011.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Solr Collection's Size
Posted by Per Steffensen <st...@designware.dk>.
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
>> <ja...@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.
>>>
>
>
Re: Solr Collection's Size
Posted by Per Steffensen <st...@designware.dk>.
"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().
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 <ja...@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.
>>
Re: Solr Collection's Size
Posted by Alexandre Rafalovitch <ar...@gmail.com>.
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 <ja...@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.
>
Re: Solr Collection's Size
Posted by Jack Krupansky <ja...@basetechnology.com>.
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.
Thanks in advance
Ranjith Venkatesan
--
View this message in context:
http://lucene.472066.n3.nabble.com/Solr-Collection-s-Size-tp4054011.html
Sent from the Solr - User mailing list archive at Nabble.com.