You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/02/05 12:04:10 UTC

[jira] [Commented] (SOLR-5530) SolrJ NoOpResponseParser

    [ https://issues.apache.org/jira/browse/SOLR-5530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13891990#comment-13891990 ] 

ASF subversion and git services commented on SOLR-5530:
-------------------------------------------------------

Commit 1564709 from shalin@apache.org in branch 'dev/trunk'
[ https://svn.apache.org/r1564709 ]

SOLR-5530: Added a NoOpResponseParser for SolrJ which puts the entire raw response into an entry in the NamedList

> SolrJ NoOpResponseParser
> ------------------------
>
>                 Key: SOLR-5530
>                 URL: https://issues.apache.org/jira/browse/SOLR-5530
>             Project: Solr
>          Issue Type: New Feature
>          Components: clients - java
>            Reporter: Upayavira
>            Assignee: Shalin Shekhar Mangar
>            Priority: Minor
>         Attachments: PATCH-5530.txt, SOLR-5530.patch, SOLR-5530.patch
>
>
> If you want the raw response string out of SolrJ, the advice seems to be to just use an HttpClient directly. 
> However, sometimes you may have a lot of SolrJ infrastructure already in place to build out queries, etc, so it would be much simpler to just use SolrJ to do the work.
> This patch offers a NoOpResponseParser, which simply puts the entire response into an entry in a NamedList.
> Because the response isn't parsed into a QueryResponse, usage is slightly different:
> HttpSolrServer server = new HttpSolrServer("http://localhost:8983/solr");
> SolrQuery query = new SolrQuery("*:*");
> QueryRequest req = new QueryRequest(query);
> server.setParser(new NoOpResponseParser());
> NamedList<Object> resp = server.request(req);
> String responseString = resp.get("response");



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org