lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandre Rafalovitch <arafa...@gmail.com>
Subject Re: difference in json update handler update/json and update/json/docs
Date Wed, 08 Feb 2017 21:20:04 GMT
/update/json expects Solr JSON update format.
/update is an auto-route that should be equivalent to /update/json
with the right content type/extension.

/update/json/docs expects random JSON and tries to extract fields for
indexing from it.
https://cwiki.apache.org/confluence/display/solr/Transforming+and+Indexing+Custom+JSON

Regards,
   Alex.

----
http://www.solr-start.com/ - Resources for Solr users, new and experienced


On 8 February 2017 at 15:54, Florian Meier
<meierflorian85@googlemail.com.invalid> wrote:
> dear solr users,
> can somebody explain the exact difference between the to update handlers? I’m asking
cause with some curl commands solr fails to identify the fields of the json doc and indexes
everything in _str_:
>
> Those work perfectly:
> curl 'http://localhost:8983/solr/testcore2/update/json?commit=true' --data-binary @example/exampledocs/cacmDocs.json
>
>
> curl 'http://localhost:8983/solr/testcore2/update?commit=true' --data-binary @example/exampledocs/cacmDocs.json
-H 'Content-type:application/json'
>
> But those two (both with update/json/docs) don't
>
> curl 'http://localhost:8983/solr/testcore2/update/json/docs?commit=true' --data-binary
@example/exampledocs/cacmDocs.json -H 'Content-type:application/json‘
>
> curl 'http://localhost:8983/solr/testcore2/update/json/docs?commit=true' --data-binary
@example/exampledocs/cacmDocs.json
>
> Cheers,
> Florian
>
>
>
>
>

Mime
View raw message