lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Tomblin <ptomb...@xcski.com>
Subject Re: How to access the information from SolrJ
Date Fri, 02 Oct 2009 14:41:43 GMT
Nope, that just gets you the number of results returned, not how many
there could be.  Like I said, if you look at the XML returned, you'll
see something like
<result name='response' numFound='1251' start='0'>
but only 10 <doc> returned.  getNumFound returns 10 in that case, not 1251.


2009/10/2 Noble Paul നോബിള്‍  नोब्ळ् <noble.paul@corp.aol.com>:
> QueryResponse#getResults()#getNumFound()
>
> On Thu, Oct 1, 2009 at 11:49 PM, Paul Tomblin <ptomblin@xcski.com> wrote:
>> When I do a query directly form the web, the XML of the response
>> includes how many results would have been returned if it hadn't
>> restricted itself to the first 10 rows:
>>
>> For instance, the query:
>> http://localhost:8080/solrChunk/nutch/select/?q=*:*&fq=category:mysites
>> returns:
>> <response>
>> <lst name='responseHeader'>
>> <int name='status'>0</int>
>> <int name='QTime'>0</int>
>> <lst name='params'>
>> <str name='q'>*:*</str>
>> <str name='fq'>category:mysites</str>
>> </lst>
>> </lst>
>> <result name='response' numFound='1251' start='0'>
>> <doc>
>> <str name='category'>mysites</str>
>> <long name='chunkNum'>0</long>
>> <str name='chunkUrl'>http://localhost/Chunks/mysites/0-http___xcski.com_.xml</str>
>> <str name='concept'>Anatomy</str>
>> ...
>>
>> The value I'm talking about is in the "numFound" attribute of the "result" tag.
>>
>> I don't see any way to retrieve it through SolrJ - it's not in the
>> QueryResponse.getHeader(), for instance.  Can I retrieve it somewhere?
>>
>> --
>> http://www.linkedin.com/in/paultomblin
>>
>
>
>
> --
> -----------------------------------------------------
> Noble Paul | Principal Engineer| AOL | http://aol.com
>



-- 
http://www.linkedin.com/in/paultomblin

Mime
View raw message