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: Adding Multiple JSON Documents
Date Mon, 03 Jun 2019 14:48:21 GMT
Hi John,

This may be useful:
https://www.slideshare.net/arafalov/json-in-solr-from-top-to-bottom
(there is the video of the session at the end too).

Basically, we have two ways to process JSON and sometimes they look
very similar and you have to be very deliberate in indicating which
one is the correct way.

Regards,
   Alex.

On Sun, 2 Jun 2019 at 22:50, John Davis <johndavis925254@gmail.com> wrote:
>
> Hi there,
>
> I was looking at the solr documentation for indexing multiple documents via
> json and noticed inconsistency in the docs.
>
> Should the POST url be /update/*json/docs *instead of just /update. It does
> look like former does work, unless both will work just fine?
>
> https://lucene.apache.org/solr/guide/7_3/uploading-data-with-index-handlers.html#adding-multiple-json-documents
> Adding Multiple JSON Documents
> <https://lucene.apache.org/solr/guide/7_3/uploading-data-with-index-handlers.html#adding-multiple-json-documents>
>
> Adding multiple documents at one time via JSON can be done via a JSON Array
> of JSON Objects, where each object represents a document:
>
> curl -X POST -H 'Content-Type: application/json'
> 'http://localhost:8983/solr/my_collection/*update*' --data-binary '[
> {    "id": "1",    "title": "Doc 1"  },  {    "id": "2",    "title":
> "Doc 2"  }]'

Mime
View raw message