You have a syntax error in your JSON with the unbalanced sequence of
enclosing squigglies & bracket. Compare the two ends.
Tom
On Tuesday, January 7, 2014 7:00:33 PM UTC-7, sammy wrote:
> Hi,
>
> I am just starting with ElasticSearch, I would like to know how to index a
> simple json document "books.json" that has the following in it: Where do I
> place the document? I placed it in root directory of elastic search and in
> /bin folder..
>
> {“books”:[{“name”:”life in heaven”,”author”:”Mike Smith”},{“name”:”get
> rich”,”author”:”Joe Shmoe”},{“name”:”luxury properties”,”author”:”Linda
> Jones”]}}
>
>
> $ curl -XPUT "http://localhost:9200/books/book/1" -d @books.json
>
> Warning: Couldn't read data from file "books.json", this makes an empty
> POST.
>
> {"error":"MapperParsingException[failed to parse, document is
> empty]","status":400}
>
>
> Thanks
>
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/6305af6b-676a-43ab-8c7c-7fc54b2764ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.