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

Ahmet Arslan commented on SOLR-6132:
------------------------------------

Hi Liram, did you try to set {code:java} server.setRequestWriter(new 
BinaryRequestWriter()); {code} ? 

Please see Shawn's following responses 
* http://search-lucene.com/m/QTPar0hud2
* http://search-lucene.com/m/QTPa7zg4E1

> UpdateRequest contains only XML ContentStream and not JavaBin 
> --------------------------------------------------------------
>
>                 Key: SOLR-6132
>                 URL: https://issues.apache.org/jira/browse/SOLR-6132
>             Project: Solr
>          Issue Type: Improvement
>          Components: clients - java, update
>            Reporter: Liram Vardi
>              Labels: UpdateProcessor, Updating, javabincodec, solrj
>
> When creating a UpdateRequest using the following code, I noted that even 
> though the request params include wt=javabin, the final request is being 
> translated to XML.
> I guess that this is because that the collection of ContentStreams that is 
> returned by UpdateRequest.getContentStreams() method contains only XML 
> ContentStream. 
>  
> Should not that UpdateRequest contain JavaBin ContentStream by default or 
> when it gets some parameter (such wt=javabin)?  
> The code:
>  UpdateRequest updateRequest = new UpdateRequest();
>  updateRequest.add(solrDocument);
>  updateRequest.setCommitWithin(-1);
>  SolrRequestParsers _parser = new SolrRequestParsers(null);
>  SolrQueryRequest req;
>  try {
>            req = _parser.buildRequestFrom(targetCore, params,       
> {color:red}updateRequest.getContentStreams(){color});
>  } catch (Exception e) {
>       throw new SolrServerException(e);
>  }



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to