Oops .. thanks for the quick reply, I shouldn't have missed this. :)

Mark

On Fri, Dec 19, 2008 at 1:25 PM, Kevin Hagel <khot...@gmail.com> wrote:

>
> http://lucene.apache.org/solr/api/org/apache/solr/client/solrj/response/QueryResponse.html#getResults()<http://lucene.apache.org/solr/api/org/apache/solr/client/solrj/response/QueryResponse.html#getResults%28%29>
>
> returns a SolrDocumentList
>
>
> http://lucene.apache.org/solr/api/org/apache/solr/common/SolrDocumentList.html
>
> which has that information
>
> On Fri, Dec 19, 2008 at 2:22 PM, Mark Ferguson <mark.a.fergu...@gmail.com
> >wrote:
>
> > Hello,
> >
> > I am trying to get the numFound attribute from a returned QueryResponse
> > object, but for the life of me I can't find where it is stored. When I
> view
> > a response in XML format, it is stored as an attribute on the response
> > node,
> > e.g.:
> >
> > <result name="response" numFound="207" start="5" maxScore="4.1191907">
> >
> > However, I can't find a way to retrieve these attributes (numFound, start
> > and maxScore). When I look at the QueryResponse itself, I can see that
> the
> > attributes are being stored somewhere, because the toString method
> returns
> > them. For example, queryResponse.toString() returns:
> >
> >
> >
> {responseHeader={status=0,QTime=139,params={wt=javabin,hl=true,rows=15,version=2.2,fl=urlmd5,start=0,q=java}},response={
> > *numFound=1228*,start=03.633028,docs=[SolrDocument[{urlmd5=...
> >
> > The problem is that when I call queryResponse.get('response'), all I get
> is
> > the list of SolrDocuments, I don't have any other attributes. Am I
> missing
> > something or are these attributes just not publically available? If
> they're
> > not, shouldn't they be? Thanks a lot,
> >
> > Mark Ferguson
> >
>

Reply via email to