You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Alexandre Rafalovitch <ar...@gmail.com> on 2017/02/08 21:20:04 UTC

Re: difference in json update handler update/json and update/json/docs

/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
<me...@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
>
>
>
>
>

Re: difference in json update handler update/json and update/json/docs

Posted by Florian Meier <me...@googlemail.com.INVALID>.
this was the right lead, thanks Alex

> Am 08.02.2017 um 22:20 schrieb Alexandre Rafalovitch <ar...@gmail.com>:
> 
> /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
> <me...@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
>> 
>> 
>> 
>> 
>>