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 Sebastian Riemer <s....@littera.eu> on 2017/02/22 14:19:59 UTC

SolrClient.queryAndStreamResponse - QueryResponse should be used with care

Dear solr users,

I am considering to switch from SolrClient.execute to SolrClient.queryAndStreamResponse, because I want to display the process of query execution.
I've found http://stackoverflow.com/a/15810200/2747410 which seems to be a good starting point for me.

However, the docs for SolrClient.queryAndStreamResponse state that:

"*Although this function returns a 'QueryResponse' it should be used with care
   * since it excludes anything that was passed to callback.  Also note that
   * future version may pass even more info to the callback and may not return
  * the results in the QueryResponse."

Since I heavily depend on the QueryResponse-Object in the calling code which executes the query, I would really like to keep that as result to work with. Does anyone know what exactly is being passed to the callback (and thus is not included in the QueryResponse)?

I currently use the following from the QueryResponse-Object:

*         getGroupResponse()

*         getResults()

*         getFacetField()

*         getFacetFields()

Best regards,

Sebastian