Re: Solrj: Getting response attributes from QueryResponse

2009-01-17 Thread solrj
Hi, I am new to Solr. I would like to know how to get DocumentId, InternalDocID and Query from QueryResponse. Thanks, Gomathi Mark Ferguson-4 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 wher

Re: Solrj: Getting response attributes from QueryResponse

2008-12-24 Thread Aleksander M. Stensby
Hello there Mark! With SolrJ, you can simply do the following: server.query(q) returns QueryResponse the queryResponse has the method getResults() which returns SolrDocumentList. This is an extended list containing SolrDocuments, but it also exposes methods such as getNumFound(), which is exa

Re: Solrj: Getting response attributes from QueryResponse

2008-12-19 Thread Mark Ferguson
Oops .. thanks for the quick reply, I shouldn't have missed this. :) Mark On Fri, Dec 19, 2008 at 1:25 PM, Kevin Hagel wrote: > > http://lucene.apache.org/solr/api/org/apache/solr/client/solrj/response/QueryResponse.html#getResults()

Re: Solrj: Getting response attributes from QueryResponse

2008-12-19 Thread Kevin Hagel
http://lucene.apache.org/solr/api/org/apache/solr/client/solrj/response/QueryResponse.html#getResults() 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 wrote: > H

Solrj: Getting response attributes from QueryResponse

2008-12-19 Thread Mark Ferguson
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.: However, I can't find a way to retrieve these attributes