[
https://issues.apache.org/jira/browse/SOLR-7042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14293626#comment-14293626
]
Erik Hatcher commented on SOLR-7042:
------------------------------------
It is possible to post to /update/json/docs currently with:
{code}
$ bin/post -url http://localhost:8983/solr/collection1/update/json/docs -c
collection1 data.json
{code}
and then using {{-params}} to add mappings, etc. But this should be
streamlined, for one not having to specify {{-url}}.
One suggestion is to reverse the assumption, and assume JSON (and eventually
XML) is arbitrary, non-Solr-specific format, and make it explicit when the data
is in Solr format, such as:
{code}
$ bin/post -c collection1 data.json # assumes arbitrary JSON, posts to
/update/json/docs
$ bin/post -c collection1 example/films/films.json -format solr # posts to
/update
{code}
> Enhance bin/post's JSON handling
> --------------------------------
>
> Key: SOLR-7042
> URL: https://issues.apache.org/jira/browse/SOLR-7042
> Project: Solr
> Issue Type: Improvement
> Components: scripts and tools
> Affects Versions: 5.0
> Reporter: Erik Hatcher
> Assignee: Erik Hatcher
> Fix For: 5.1
>
>
> The current (5.0) version of bin/post assumes JSON (and XML) are in *Solr*
> command format, eg. {{bin/post -c collection1 data.json}} and that the URL to
> post to is /update.
> This issue is to improve/evolve bin/post so that it can post to /update when
> the data is in *Solr* XML or JSON format and to /update/json/docs for
> arbitrary JSON.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]