[ 
https://issues.apache.org/jira/browse/SOLR-6132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hoss Man resolved SOLR-6132.
----------------------------

    Resolution: Not a Problem

{{wt=javabin}} is a request parameter that instructs the server that you want 
the "Writer Type" used for generating the _response_ to be in javabin.

It has nothing to do with what format your SolrJ code uses when sending the 
_request_.  Yo uare free to send your update data in one format, and request 
that solr send you the response in another.

As a concrete example, imagine if you were using {{ContentStreamUpdateRequest}} 
to stream a bunch of raw binary files to the extracting request handler -- just 
because you set the {{qt}} param to control whether  the result status info is 
returned in javabin, or xml, or json doesn't mean that SolrJ can/should muck 
with the data being sent to solr.



> 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to