[
https://issues.apache.org/jira/browse/SOLR-6938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14270982#comment-14270982
]
Erik Hatcher edited comment on SOLR-6938 at 1/9/15 1:12 PM:
------------------------------------------------------------
bq. is stream.contentType used anywhere in the code?
Yes. Look for CommonParams.STREAM_CONTENTTYPE. The general, common stream
handling uses this, if specified. In fact, UpdateRequestHandler falls back to
the stream contentType setting if the update.contentType isn't specified.
At first glance, it looks like update.contentType is redundant or unnecessary?
was (Author: ehatcher):
bq. is stream.contentType used anywhere in the code?
Yes. Look for CommonParams.STREAM_CONTENTTYPE. The general, common stream
handling uses this, if specified.
> Implicit configuration of Update handlers does not match previous explicit one
> ------------------------------------------------------------------------------
>
> Key: SOLR-6938
> URL: https://issues.apache.org/jira/browse/SOLR-6938
> Project: Solr
> Issue Type: Bug
> Components: update
> Affects Versions: 5.0
> Reporter: Alexandre Rafalovitch
>
> There seem to be confusion/inconsistency between *contentType* (stream or
> update) parameter as defined in the commented-out update handler and new
> implicit implementation.
> Specifically, in (current 5 build's) techproduct's solrconfig.xml, it says:
> {quote}
> <!-- The following are implicitly added
> <requestHandler name="/update/json" class="solr.UpdateRequestHandler">
> <lst name="defaults">
> <str name="stream.contentType">application/json</str>
> </lst>
> </requestHandler>
> <requestHandler name="/update/csv" class="solr.UpdateRequestHandler">
> <lst name="defaults">
> <str name="stream.contentType">application/csv</str>
> </lst>
> </requestHandler>
> -->
> {quote}
> The documentation also says to use *stream.contentType* at:
> https://cwiki.apache.org/confluence/display/solr/Uploading+Data+with+Index+Handlers
> However, the http://localhost:8983/solr/techproducts/config says instead:
> {quote}
> "/update/json":{
> "name":"/update/json",
> "class":"org.apache.solr.handler.UpdateRequestHandler",
> "defaults":{"update.contentType":"application/json"}},
> "/update/csv":{
> "name":"/update/csv",
> "class":"org.apache.solr.handler.UpdateRequestHandler",
> "defaults":{"update.contentType":"application/csv"}},
> {quote}
> Seems to be pure inconsistency, since Reference Guide does not mention
> *update.contentType*.
> Yet earlier in the same *solrconfig.xml* it says:
> {quote}
> To override the request content type and force a specific
> Content-type, use the request parameter:
> ?update.contentType=text/csv
> {quote}
> Are these different or same? They should definitely be consistent between
> code and comment, but it seems there is a bit of an extra confusion on top.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]