# How to index a .JSON file

**URL:** <https://discuss.elastic.co/t/how-to-index-a-json-file/11539>\
**Category:** Elasticsearch\
**Created:** [April 10, 2013, 8:55pm UTC](https://discuss.elastic.co/t/how-to-index-a-json-file/11539 "2013-04-10T20:55:45Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![OffensivelyBad\_2](https://avatars.discourse-cdn.com/v4/letter/o/51bf81/32.png) [@OffensivelyBad\_2](https://discuss.elastic.co/u/OffensivelyBad_2)\
**Post date:** [April 10, 2013, 8:55pm UTC](https://discuss.elastic.co/t/how-to-index-a-json-file/11539/1 "2013-04-10T20:55:45Z")

</div>

I'm completely new to Elasticsearch and I've been importing data to  
Elasticsearch up to this point by manually entering the JSON.

I'd like to begin loading in .json files to make things faster and possibly  
to bulk load in the future. I'm not sure how to do this currently. The  
.json would be generated from a SQL Server query and formatted as JSON by  
another layer, and then placed in a folder on the server.

I've attempted to run this code to index the JSON, however I get an error  
message:

[root@JFBLOUVMLXECS01 ~]# curl -XPOST  
'[http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)' -d lane.json  
{"error":"ElasticSearchParseException[Failed to derive xcontent from  
(offset=0, length=9): [108, 97, 110, 101, 46, 106, 115, 111,  
110]]","status":400}[root@JFBLOUVMLXECS01 ~]#

Any help you can provide would be much appreciated. Please keep in mind  
I'm a total noob with this.

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Rafal\_Kuc\_3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rafal_kuc_3/32/799_2.png) [@Rafal\_Kuc\_3](https://discuss.elastic.co/u/Rafal_Kuc_3)\
**Post date:** [April 10, 2013, 9:03pm UTC](https://discuss.elastic.co/t/how-to-index-a-json-file/11539/2 "2013-04-10T21:03:43Z")

</div>

Hello!

You can find more information about indexing data here: [http://www.elasticsearch.org/guide/reference/api/index\_/](http://www.elasticsearch.org/guide/reference/api/index_/)

One thing I've noticed in your command is that you lack the @ character before the file name. Your command should look like this:

curl -XPOST '[http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)' -d @lane.json

instead of the one you've pasted.

_--_

Regards,

Rafał Kuć

Sematext :: [http://sematext.com/](http://sematext.com/) _:: Solr - Lucene - Nutch - ElasticSearch_

I'm completely new to Elasticsearch and I've been importing data to Elasticsearch up to this point by manually entering the JSON.

I'd like to begin loading in .json files to make things faster and possibly to bulk load in the future. I'm not sure how to do this currently. The .json would be generated from a SQL Server query and formatted as JSON by another layer, and then placed in a folder on the server.

I've attempted to run this code to index the JSON, however I get an error message:

[root@JFBLOUVMLXECS01 ~]# curl -XPOST '[http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)' -d lane.json

{"error":"ElasticSearchParseException[Failed to derive xcontent from (offset=0, length=9): [108, 97, 110, 101, 46, 106, 115, 111, 110]]","status":400}[root@JFBLOUVMLXECS01 ~]#

Any help you can provide would be much appreciated. Please keep in mind I'm a total noob with this.

--

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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).

For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![OffensivelyBad\_2](https://avatars.discourse-cdn.com/v4/letter/o/51bf81/32.png) [@OffensivelyBad\_2](https://discuss.elastic.co/u/OffensivelyBad_2)\
**Post date:** [April 10, 2013, 9:45pm UTC](https://discuss.elastic.co/t/how-to-index-a-json-file/11539/3 "2013-04-10T21:45:04Z")

</div>

Thanks. I've tried adding the @ and that works for a very simple JSON  
document. This is the one I used:

{"lane":"M05","routes":160}

I also tried adding this JSON doc with 2 rows (2 records) like this,  
however it put both records under the same id:

{"lane":"M05","routes":160},{"lane":"M04","routes":170}

How can I do this when I have multiple records in the same .json file?

On Wednesday, April 10, 2013 5:03:43 PM UTC-4, Rafał Kuć wrote:

> Hello!
> 
> You can find more information about indexing data here:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/index_/)
> 
> One thing I've noticed in your command is that you lack the @ character  
> before the file name. Your command should look like this:
> 
> curl -XPOST '[http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)' -d @lane.json
> 
> instead of the one you've pasted.
> 
> \*--  
> Regards,  
> Rafał Kuć  
> Sematext :: _[http://sematext.com/](http://sematext.com/)_ :: Solr - Lucene - Nutch -  
> Elasticsearch
> 
> - 
> 
> I'm completely new to Elasticsearch and I've been importing data to  
> Elasticsearch up to this point by manually entering the JSON.
> 
> I'd like to begin loading in .json files to make things faster and  
> possibly to bulk load in the future. I'm not sure how to do this  
> currently. The .json would be generated from a SQL Server query and  
> formatted as JSON by another layer, and then placed in a folder on the  
> server.
> 
> I've attempted to run this code to index the JSON, however I get an error  
> message:
> 
> [root@JFBLOUVMLXECS01 ~]# curl -XPOST '  
> [http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)' -d lane.json  
> {"error":"ElasticSearchParseException[Failed to derive xcontent from  
> (offset=0, length=9): [108, 97, 110, 101, 46, 106, 115, 111,  
> 110]]","status":400}[root@JFBLOUVMLXECS01 ~]#
> 
> ## Any help you can provide would be much appreciated. Please keep in mind I'm a total noob with this.
> 
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Rafal\_Kuc\_3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rafal_kuc_3/32/799_2.png) [@Rafal\_Kuc\_3](https://discuss.elastic.co/u/Rafal_Kuc_3)\
**Post date:** [April 10, 2013, 9:49pm UTC](https://discuss.elastic.co/t/how-to-index-a-json-file/11539/4 "2013-04-10T21:49:56Z")

</div>

Hello!

In order to send two documents in the same JSON file you need to use ElasticSearch Bulk API. You can find more information about it here: [http://www.elasticsearch.org/guide/reference/api/bulk/](http://www.elasticsearch.org/guide/reference/api/bulk/)

Basically your document would have to look like this:

{"index":{"\_index":"test","\_type":"test","\_id":"1"}}  
{"lane":"M05","routes":160}  
{"index":{"\_index":"test","\_type":"test","\_id":"2"}}  
{"lane":"M04","routes":170}

If the above content would be stored in a file called bulk.json, you can send it using the following command:

curl -s -XPOST '[http://jfblouvmlxecs01:9200/\_bulk](http://jfblouvmlxecs01:9200/_bulk)' --data-binary @bulk.json

--  
Regards,  
Rafał Kuć  
Sematext :: [http://sematext.com/](http://sematext.com/) :: Solr - Lucene - Nutch - ElasticSearch

Thanks. I've tried adding the @ and that works for a very simple JSON document. This is the one I used:  
{"lane":"M05","routes":160}

I also tried adding this JSON doc with 2 rows (2 records) like this, however it put both records under the same id:

{"lane":"M05","routes":160},{"lane":"M04","routes":170}

How can I do this when I have multiple records in the same .json file?

On Wednesday, April 10, 2013 5:03:43 PM UTC-4, Rafał Kuć wrote:  
Hello!

You can find more information about indexing data here: [http://www.elasticsearch.org/guide/reference/api/index\_/](http://www.elasticsearch.org/guide/reference/api/index_/)

One thing I've noticed in your command is that you lack the @ character before the file name. Your command should look like this:

curl -XPOST '[http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)' -d @lane.json

instead of the one you've pasted.

--  
Regards,  
Rafał Kuć  
Sematext :: [http://sematext.com/](http://sematext.com/) :: Solr - Lucene - Nutch - ElasticSearch

I'm completely new to Elasticsearch and I've been importing data to Elasticsearch up to this point by manually entering the JSON.

I'd like to begin loading in .json files to make things faster and possibly to bulk load in the future. I'm not sure how to do this currently. The .json would be generated from a SQL Server query and formatted as JSON by another layer, and then placed in a folder on the server.

I've attempted to run this code to index the JSON, however I get an error message:

[root@JFBLOUVMLXECS01 ~]# curl -XPOST '[http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)' -d lane.json  
{"error":"ElasticSearchParseException[Failed to derive xcontent from (offset=0, length=9): [108, 97, 110, 101, 46, 106, 115, 111, 110]]","status":400}[root@JFBLOUVMLXECS01 ~]#

## Any help you can provide would be much appreciated. Please keep in mind I'm a total noob with this.

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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![OffensivelyBad\_2](https://avatars.discourse-cdn.com/v4/letter/o/51bf81/32.png) [@OffensivelyBad\_2](https://discuss.elastic.co/u/OffensivelyBad_2)\
**Post date:** [April 10, 2013, 10:01pm UTC](https://discuss.elastic.co/t/how-to-index-a-json-file/11539/5 "2013-04-10T22:01:48Z")

</div>

Thanks.

I just tried this a couple times (setting the "\_id" fields to unused  
numbers, however only the first record gets added. It skips the second  
record. Any idea why?

This is the exact file I used and only the first record (M05) was loaded  
into Elasticsearch:

{"index":{"\_index":"test","\_type":"test","\_id":"13"}}  
{"lane":"M05","routes":160}  
{"index":{"\_index":"test","\_type":"test","\_id":"14"}}  
{"lane":"M04","routes":170}

On Wednesday, April 10, 2013 5:49:56 PM UTC-4, Rafał Kuć wrote:

> Hello!
> 
> In order to send two documents in the same JSON file you need to use  
> Elasticsearch Bulk API. You can find more information about it here:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/bulk/)
> 
> Basically your document would have to look like this:
> 
> {"index":{"\_index":"test","\_type":"test","\_id":"1"}}  
> {"lane":"M05","routes":160}  
> {"index":{"\_index":"test","\_type":"test","\_id":"2"}}  
> {"lane":"M04","routes":170}
> 
> If the above content would be stored in a file called bulk.json, you can  
> send it using the following command:
> 
> curl -s -XPOST '[http://jfblouvmlxecs01:9200/\_bulk](http://jfblouvmlxecs01:9200/_bulk)' --data-binary  
> @bulk.json
> 
> --  
> Regards,  
> Rafał Kuć  
> Sematext :: [http://sematext.com/](http://sematext.com/) :: Solr - Lucene - Nutch -  
> Elasticsearch
> 
> Thanks. I've tried adding the @ and that works for a very simple JSON  
> document. This is the one I used:  
> {"lane":"M05","routes":160}
> 
> I also tried adding this JSON doc with 2 rows (2 records) like this,  
> however it put both records under the same id:
> 
> {"lane":"M05","routes":160},{"lane":"M04","routes":170}
> 
> How can I do this when I have multiple records in the same .json file?
> 
> On Wednesday, April 10, 2013 5:03:43 PM UTC-4, Rafał Kuć wrote:  
> Hello!
> 
> You can find more information about indexing data here:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/index_/)
> 
> One thing I've noticed in your command is that you lack the @ character  
> before the file name. Your command should look like this:
> 
> curl -XPOST '[http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)' -d @lane.json
> 
> instead of the one you've pasted.
> 
> --  
> Regards,  
> Rafał Kuć  
> Sematext :: [http://sematext.com/](http://sematext.com/) :: Solr - Lucene - Nutch -  
> Elasticsearch
> 
> I'm completely new to Elasticsearch and I've been importing data to  
> Elasticsearch up to this point by manually entering the JSON.
> 
> I'd like to begin loading in .json files to make things faster and  
> possibly to bulk load in the future. I'm not sure how to do this  
> currently. The .json would be generated from a SQL Server query and  
> formatted as JSON by another layer, and then placed in a folder on the  
> server.
> 
> I've attempted to run this code to index the JSON, however I get an error  
> message:
> 
> [root@JFBLOUVMLXECS01 ~]# curl -XPOST '  
> [http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)' -d lane.json  
> {"error":"ElasticSearchParseException[Failed to derive xcontent from  
> (offset=0, length=9): [108, 97, 110, 101, 46, 106, 115, 111,  
> 110]]","status":400}[root@JFBLOUVMLXECS01 ~]#
> 
> ## Any help you can provide would be much appreciated. Please keep in mind I'm a total noob with this.
> 
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Rafal\_Kuc\_3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rafal_kuc_3/32/799_2.png) [@Rafal\_Kuc\_3](https://discuss.elastic.co/u/Rafal_Kuc_3)\
**Post date:** [April 10, 2013, 10:06pm UTC](https://discuss.elastic.co/t/how-to-index-a-json-file/11539/6 "2013-04-10T22:06:49Z")

</div>

Hello!

Notice, that the last line of data must end with the new line character. I assume that is the reason for the behavior you are seeing.

_--_

Regards,

Rafał Kuć

Sematext :: [http://sematext.com/](http://sematext.com/) _:: Solr - Lucene - Nutch - ElasticSearch_

Thanks.

I just tried this a couple times (setting the "\_id" fields to unused numbers, however only the first record gets added. It skips the second record. Any idea why?

This is the exact file I used and only the first record (M05) was loaded into Elasticsearch:

{"index":{"\_index":"test","\_type":"test","\_id":"13"}}

{"lane":"M05","routes":160}

{"index":{"\_index":"test","\_type":"test","\_id":"14"}}

{"lane":"M04","routes":170}

On Wednesday, April 10, 2013 5:49:56 PM UTC-4, Rafał Kuć wrote:

Hello!

In order to send two documents in the same JSON file you need to use ElasticSearch Bulk API. You can find more information about it here: [http://www.elasticsearch.org/](http://www.elasticsearch.org/guide/reference/api/bulk/)[guide/reference/api/bulk/](http://www.elasticsearch.org/guide/reference/api/bulk/)

Basically your document would have to look like this:

{"index":{"\_index":"test","\_type":"test","\_id":"1"}}

{"lane":"M05","routes":160}

{"index":{"\_index":"test","\_type":"test","\_id":"2"}}

{"lane":"M04","routes":170}

If the above content would be stored in a file called bulk.json, you can send it using the following command:

curl -s -XPOST '[http://jfblouvmlxecs01:9200/\_](http://jfblouvmlxecs01:9200/_bulk)[bulk](http://jfblouvmlxecs01:9200/_bulk)' --data-binary @bulk.json

--

Regards,

Rafał Kuć

Sematext :: [http://sematext.com/](http://sematext.com/) :: Solr - Lucene - Nutch - ElasticSearch

Thanks. I've tried adding the @ and that works for a very simple JSON document. This is the one I used:

{"lane":"M05","routes":160}

I also tried adding this JSON doc with 2 rows (2 records) like this, however it put both records under the same id:

{"lane":"M05","routes":160},{"lane":"M04","routes":170}

How can I do this when I have multiple records in the same .json file?

On Wednesday, April 10, 2013 5:03:43 PM UTC-4, Rafał Kuć wrote:

Hello!

You can find more information about indexing data here: [http://www.elasticsearch.org/](http://www.elasticsearch.org/guide/reference/api/index_/)[guide/reference/api/index\_/](http://www.elasticsearch.org/guide/reference/api/index_/)

One thing I've noticed in your command is that you lack the @ character before the file name. Your command should look like this:

curl -XPOST '[http://jfblouvmlxecs01:9200/](http://jfblouvmlxecs01:9200/test/test/1)[test/test/1](http://jfblouvmlxecs01:9200/test/test/1)' -d @lane.json

instead of the one you've pasted.

--

Regards,

Rafał Kuć

Sematext :: [http://sematext.com/](http://sematext.com/) :: Solr - Lucene - Nutch - ElasticSearch

I'm completely new to Elasticsearch and I've been importing data to Elasticsearch up to this point by manually entering the JSON.

I'd like to begin loading in .json files to make things faster and possibly to bulk load in the future. I'm not sure how to do this currently. The .json would be generated from a SQL Server query and formatted as JSON by another layer, and then placed in a folder on the server.

I've attempted to run this code to index the JSON, however I get an error message:

[root@JFBLOUVMLXECS01 ~]# curl -XPOST '[http://jfblouvmlxecs01:9200/](http://jfblouvmlxecs01:9200/test/test/1)[test/test/1](http://jfblouvmlxecs01:9200/test/test/1)' -d lane.json

{"error":"ElasticSearchParseException[Failed to derive xcontent from (offset=0, length=9): [108, 97, 110, 101, 46, 106, 115, 111, 110]]","status":400}[root@JFBLOUVMLXECS01 ~]#

Any help you can provide would be much appreciated. Please keep in mind I'm a total noob with this.

--

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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).

For more options, visit [https://groups.google.com/](https://groups.google.com/groups/opt_out)[groups/opt\_out](https://groups.google.com/groups/opt_out).

--

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 elasticsearc...@googlegroups.com.

For more options, visit [https://groups.google.com/](https://groups.google.com/groups/opt_out)[groups/opt\_out](https://groups.google.com/groups/opt_out).

--

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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).

For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![OffensivelyBad\_2](https://avatars.discourse-cdn.com/v4/letter/o/51bf81/32.png) [@OffensivelyBad\_2](https://discuss.elastic.co/u/OffensivelyBad_2)\
**Post date:** [April 10, 2013, 10:22pm UTC](https://discuss.elastic.co/t/how-to-index-a-json-file/11539/7 "2013-04-10T22:22:22Z")

</div>

Thank you Rafal. That worked. In case anyone else wants to know, I had to  
include the \n on the line _after_ the last line of data:

{"index":{"\_index":"test","\_type":"test","\_id":"11"}}  
{"lane":"M05","routes":160}  
{"index":{"\_index":"test","\_type":"test","\_id":"12"}}  
{"lane":"M04","routes":170}  
{"index":{"\_index":"test","\_type":"test","\_id":"13"}}  
{"lane":"M06","routes":190}  
\n

On Wednesday, April 10, 2013 6:06:49 PM UTC-4, Rafał Kuć wrote:

> Hello!
> 
> Notice, that the last line of data must end with the new line character. I  
> assume that is the reason for the behavior you are seeing.
> 
> \*--  
> Regards,  
> Rafał Kuć  
> Sematext :: _[http://sematext.com/](http://sematext.com/)_ :: Solr - Lucene - Nutch -  
> Elasticsearch
> 
> - 
> 
> Thanks.
> 
> I just tried this a couple times (setting the "\_id" fields to unused  
> numbers, however only the first record gets added. It skips the second  
> record. Any idea why?
> 
> This is the exact file I used and only the first record (M05) was loaded  
> into Elasticsearch:
> 
> {"index":{"\_index":"test","\_type":"test","\_id":"13"}}  
> {"lane":"M05","routes":160}  
> {"index":{"\_index":"test","\_type":"test","\_id":"14"}}  
> {"lane":"M04","routes":170}
> 
> On Wednesday, April 10, 2013 5:49:56 PM UTC-4, Rafał Kuć wrote:  
> Hello!
> 
> In order to send two documents in the same JSON file you need to use  
> Elasticsearch Bulk API. You can find more information about it here:  
> [http://www.elasticsearch.org/](http://www.elasticsearch.org/)[http://www.elasticsearch.org/guide/reference/api/bulk/](http://www.elasticsearch.org/guide/reference/api/bulk/)  
> guide/reference/api/bulk/[http://www.elasticsearch.org/guide/reference/api/bulk/](http://www.elasticsearch.org/guide/reference/api/bulk/)
> 
> Basically your document would have to look like this:
> 
> {"index":{"\_index":"test","\_type":"test","\_id":"1"}}  
> {"lane":"M05","routes":160}  
> {"index":{"\_index":"test","\_type":"test","\_id":"2"}}  
> {"lane":"M04","routes":170}
> 
> If the above content would be stored in a file called bulk.json, you can  
> send it using the following command:
> 
> curl -s -XPOST '[http://jfblouvmlxecs01:9200/\_](http://jfblouvmlxecs01:9200/_)[http://jfblouvmlxecs01:9200/\_bulk](http://jfblouvmlxecs01:9200/_bulk)  
> bulk [http://jfblouvmlxecs01:9200/\_bulk](http://jfblouvmlxecs01:9200/_bulk)' --data-binary @bulk.json
> 
> --  
> Regards,  
> Rafał Kuć  
> Sematext :: [http://sematext.com/](http://sematext.com/) :: Solr - Lucene - Nutch -  
> Elasticsearch
> 
> Thanks. I've tried adding the @ and that works for a very simple JSON  
> document. This is the one I used:  
> {"lane":"M05","routes":160}
> 
> I also tried adding this JSON doc with 2 rows (2 records) like this,  
> however it put both records under the same id:
> 
> {"lane":"M05","routes":160},{"lane":"M04","routes":170}
> 
> How can I do this when I have multiple records in the same .json file?
> 
> On Wednesday, April 10, 2013 5:03:43 PM UTC-4, Rafał Kuć wrote:  
> Hello!
> 
> You can find more information about indexing data here:  
> [http://www.elasticsearch.org/](http://www.elasticsearch.org/)[http://www.elasticsearch.org/guide/reference/api/index\_/](http://www.elasticsearch.org/guide/reference/api/index_/)  
> guide/reference/api/index\_/[http://www.elasticsearch.org/guide/reference/api/index\_/](http://www.elasticsearch.org/guide/reference/api/index_/)
> 
> One thing I've noticed in your command is that you lack the @ character  
> before the file name. Your command should look like this:
> 
> curl -XPOST '[http://jfblouvmlxecs01:9200/](http://jfblouvmlxecs01:9200/)[http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)  
> test/test/1 [http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)' -d @lane.json
> 
> instead of the one you've pasted.
> 
> --  
> Regards,  
> Rafał Kuć  
> Sematext :: [http://sematext.com/](http://sematext.com/) :: Solr - Lucene - Nutch -  
> Elasticsearch
> 
> I'm completely new to Elasticsearch and I've been importing data to  
> Elasticsearch up to this point by manually entering the JSON.
> 
> I'd like to begin loading in .json files to make things faster and  
> possibly to bulk load in the future. I'm not sure how to do this  
> currently. The .json would be generated from a SQL Server query and  
> formatted as JSON by another layer, and then placed in a folder on the  
> server.
> 
> I've attempted to run this code to index the JSON, however I get an error  
> message:
> 
> [root@JFBLOUVMLXECS01 ~]# curl -XPOST '[http://jfblouvmlxecs01:9200/](http://jfblouvmlxecs01:9200/)[http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)  
> test/test/1 [http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)' -d lane.json  
> {"error":"ElasticSearchParseException[Failed to derive xcontent from  
> (offset=0, length=9): [108, 97, 110, 101, 46, 106, 115, 111,  
> 110]]","status":400}[root@JFBLOUVMLXECS01 ~]#
> 
> ## Any help you can provide would be much appreciated. Please keep in mind I'm a total noob with this.
> 
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> For more options, visit [https://groups.google.com/](https://groups.google.com/)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> groups/opt\_out [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> For more options, visit [https://groups.google.com/](https://groups.google.com/)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> groups/opt\_out [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![OffensivelyBad\_2](https://avatars.discourse-cdn.com/v4/letter/o/51bf81/32.png) [@OffensivelyBad\_2](https://discuss.elastic.co/u/OffensivelyBad_2)\
**Post date:** [April 10, 2013, 10:27pm UTC](https://discuss.elastic.co/t/how-to-index-a-json-file/11539/8 "2013-04-10T22:27:07Z")

</div>

Also, is there a way to eliminate the need for the index lines in the JSON?  
The data that I will be entering into Elasticsearch is going to be many  
thousands of rows and formatting each of them to display the index line  
will require another application to format each line.

Is there a way to specify a file like this?

{"lane":"M05","routes":160}  
{"lane":"M04","routes":170}  
{"lane":"M06","routes":190}

I saw in the bulk example[http://www.elasticsearch.org/guide/reference/api/bulk/](http://www.elasticsearch.org/guide/reference/api/bulk/) that  
"cat requests" is used for the index line, though I'm not sure what that  
does or how to use it.

On Wednesday, April 10, 2013 6:22:22 PM UTC-4, OffensivelyBad wrote:

> Thank you Rafal. That worked. In case anyone else wants to know, I had  
> to include the \n on the line _after_ the last line of data:
> 
> {"index":{"\_index":"test","\_type":"test","\_id":"11"}}  
> {"lane":"M05","routes":160}  
> {"index":{"\_index":"test","\_type":"test","\_id":"12"}}  
> {"lane":"M04","routes":170}  
> {"index":{"\_index":"test","\_type":"test","\_id":"13"}}  
> {"lane":"M06","routes":190}  
> \n
> 
> On Wednesday, April 10, 2013 6:06:49 PM UTC-4, Rafał Kuć wrote:
> 
> > Hello!
> > 
> > Notice, that the last line of data must end with the new line character.  
> > I assume that is the reason for the behavior you are seeing.
> > 
> > \*--  
> > Regards,  
> > Rafał Kuć  
> > Sematext :: _[http://sematext.com/](http://sematext.com/)_ :: Solr - Lucene - Nutch -  
> > Elasticsearch
> > 
> > - 
> > 
> > Thanks.
> > 
> > I just tried this a couple times (setting the "\_id" fields to unused  
> > numbers, however only the first record gets added. It skips the second  
> > record. Any idea why?
> > 
> > This is the exact file I used and only the first record (M05) was loaded  
> > into Elasticsearch:
> > 
> > {"index":{"\_index":"test","\_type":"test","\_id":"13"}}  
> > {"lane":"M05","routes":160}  
> > {"index":{"\_index":"test","\_type":"test","\_id":"14"}}  
> > {"lane":"M04","routes":170}
> > 
> > On Wednesday, April 10, 2013 5:49:56 PM UTC-4, Rafał Kuć wrote:  
> > Hello!
> > 
> > In order to send two documents in the same JSON file you need to use  
> > Elasticsearch Bulk API. You can find more information about it here:  
> > [http://www.elasticsearch.org/](http://www.elasticsearch.org/)[http://www.elasticsearch.org/guide/reference/api/bulk/](http://www.elasticsearch.org/guide/reference/api/bulk/)  
> > guide/reference/api/bulk/[http://www.elasticsearch.org/guide/reference/api/bulk/](http://www.elasticsearch.org/guide/reference/api/bulk/)
> > 
> > Basically your document would have to look like this:
> > 
> > {"index":{"\_index":"test","\_type":"test","\_id":"1"}}  
> > {"lane":"M05","routes":160}  
> > {"index":{"\_index":"test","\_type":"test","\_id":"2"}}  
> > {"lane":"M04","routes":170}
> > 
> > If the above content would be stored in a file called bulk.json, you can  
> > send it using the following command:
> > 
> > curl -s -XPOST '[http://jfblouvmlxecs01:9200/\_](http://jfblouvmlxecs01:9200/_)[http://jfblouvmlxecs01:9200/\_bulk](http://jfblouvmlxecs01:9200/_bulk)  
> > bulk [http://jfblouvmlxecs01:9200/\_bulk](http://jfblouvmlxecs01:9200/_bulk)' --data-binary @bulk.json
> > 
> > --  
> > Regards,  
> > Rafał Kuć  
> > Sematext :: [http://sematext.com/](http://sematext.com/) :: Solr - Lucene - Nutch -  
> > Elasticsearch
> > 
> > Thanks. I've tried adding the @ and that works for a very simple JSON  
> > document. This is the one I used:  
> > {"lane":"M05","routes":160}
> > 
> > I also tried adding this JSON doc with 2 rows (2 records) like this,  
> > however it put both records under the same id:
> > 
> > {"lane":"M05","routes":160},{"lane":"M04","routes":170}
> > 
> > How can I do this when I have multiple records in the same .json file?
> > 
> > On Wednesday, April 10, 2013 5:03:43 PM UTC-4, Rafał Kuć wrote:  
> > Hello!
> > 
> > You can find more information about indexing data here:  
> > [http://www.elasticsearch.org/](http://www.elasticsearch.org/)[http://www.elasticsearch.org/guide/reference/api/index\_/](http://www.elasticsearch.org/guide/reference/api/index_/)  
> > guide/reference/api/index\_/[http://www.elasticsearch.org/guide/reference/api/index\_/](http://www.elasticsearch.org/guide/reference/api/index_/)
> > 
> > One thing I've noticed in your command is that you lack the @ character  
> > before the file name. Your command should look like this:
> > 
> > curl -XPOST '[http://jfblouvmlxecs01:9200/](http://jfblouvmlxecs01:9200/)[http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)  
> > test/test/1 [http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)' -d @lane.json
> > 
> > instead of the one you've pasted.
> > 
> > --  
> > Regards,  
> > Rafał Kuć  
> > Sematext :: [http://sematext.com/](http://sematext.com/) :: Solr - Lucene - Nutch -  
> > Elasticsearch
> > 
> > I'm completely new to Elasticsearch and I've been importing data to  
> > Elasticsearch up to this point by manually entering the JSON.
> > 
> > I'd like to begin loading in .json files to make things faster and  
> > possibly to bulk load in the future. I'm not sure how to do this  
> > currently. The .json would be generated from a SQL Server query and  
> > formatted as JSON by another layer, and then placed in a folder on the  
> > server.
> > 
> > I've attempted to run this code to index the JSON, however I get an error  
> > message:
> > 
> > [root@JFBLOUVMLXECS01 ~]# curl -XPOST '[http://jfblouvmlxecs01:9200/](http://jfblouvmlxecs01:9200/)[http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)  
> > test/test/1 [http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)' -d lane.json  
> > {"error":"ElasticSearchParseException[Failed to derive xcontent from  
> > (offset=0, length=9): [108, 97, 110, 101, 46, 106, 115, 111,  
> > 110]]","status":400}[root@JFBLOUVMLXECS01 ~]#
> > 
> > ## Any help you can provide would be much appreciated. Please keep in mind I'm a total noob with this.
> > 
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > For more options, visit [https://groups.google.com/](https://groups.google.com/)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > groups/opt\_out [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > For more options, visit [https://groups.google.com/](https://groups.google.com/)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > groups/opt\_out [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 11, 2013, 2:23am UTC](https://discuss.elastic.co/t/how-to-index-a-json-file/11539/9 "2013-04-11T02:23:01Z")

</div>

You can also at FSRiver. [GitHub - dadoonet/fscrawler: Elasticsearch File System Crawler (FS Crawler)](https://github.com/dadoonet/fsriver)  
Latest version can now index JSON files in a directory.

HTH

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 11 avr. 2013 à 00:27, OffensivelyBad [shawnroller10@gmail.com](mailto:shawnroller10@gmail.com) a écrit :

Also, is there a way to eliminate the need for the index lines in the JSON? The data that I will be entering into Elasticsearch is going to be many thousands of rows and formatting each of them to display the index line will require another application to format each line.

Is there a way to specify a file like this?

{"lane":"M05","routes":160}  
{"lane":"M04","routes":170}  
{"lane":"M06","routes":190}

I saw in the bulk example that "cat requests" is used for the index line, though I'm not sure what that does or how to use it.

On Wednesday, April 10, 2013 6:22:22 PM UTC-4, OffensivelyBad wrote:

> Thank you Rafal. That worked. In case anyone else wants to know, I had to include the \n on the line after the last line of data:
> 
> {"index":{"\_index":"test","\_type":"test","\_id":"11"}}  
> {"lane":"M05","routes":160}  
> {"index":{"\_index":"test","\_type":"test","\_id":"12"}}  
> {"lane":"M04","routes":170}  
> {"index":{"\_index":"test","\_type":"test","\_id":"13"}}  
> {"lane":"M06","routes":190}  
> \n
> 
> On Wednesday, April 10, 2013 6:06:49 PM UTC-4, Rafał Kuć wrote:
> 
> > Hello!
> > 
> > Notice, that the last line of data must end with the new line character. I assume that is the reason for the behavior you are seeing.
> > 
> > --  
> > Regards,  
> > Rafał Kuć  
> > Sematext :: [http://sematext.com/](http://sematext.com/) :: Solr - Lucene - Nutch - Elasticsearch
> > 
> > Thanks.
> > 
> > I just tried this a couple times (setting the "\_id" fields to unused numbers, however only the first record gets added. It skips the second record. Any idea why?
> > 
> > This is the exact file I used and only the first record (M05) was loaded into Elasticsearch:
> > 
> > {"index":{"\_index":"test","\_type":"test","\_id":"13"}}  
> > {"lane":"M05","routes":160}  
> > {"index":{"\_index":"test","\_type":"test","\_id":"14"}}  
> > {"lane":"M04","routes":170}
> > 
> > On Wednesday, April 10, 2013 5:49:56 PM UTC-4, Rafał Kuć wrote:  
> > Hello!
> > 
> > In order to send two documents in the same JSON file you need to use Elasticsearch Bulk API. You can find more information about it here: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/bulk/)
> > 
> > Basically your document would have to look like this:
> > 
> > {"index":{"\_index":"test","\_type":"test","\_id":"1"}}  
> > {"lane":"M05","routes":160}  
> > {"index":{"\_index":"test","\_type":"test","\_id":"2"}}  
> > {"lane":"M04","routes":170}
> > 
> > If the above content would be stored in a file called bulk.json, you can send it using the following command:
> > 
> > curl -s -XPOST '[http://jfblouvmlxecs01:9200/\_bulk](http://jfblouvmlxecs01:9200/_bulk)' --data-binary @bulk.json
> > 
> > --  
> > Regards,  
> > Rafał Kuć  
> > Sematext :: [http://sematext.com/](http://sematext.com/) :: Solr - Lucene - Nutch - Elasticsearch
> > 
> > Thanks. I've tried adding the @ and that works for a very simple JSON document. This is the one I used:  
> > {"lane":"M05","routes":160}
> > 
> > I also tried adding this JSON doc with 2 rows (2 records) like this, however it put both records under the same id:
> > 
> > {"lane":"M05","routes":160},{"lane":"M04","routes":170}
> > 
> > How can I do this when I have multiple records in the same .json file?
> > 
> > On Wednesday, April 10, 2013 5:03:43 PM UTC-4, Rafał Kuć wrote:  
> > Hello!
> > 
> > You can find more information about indexing data here: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/index_/)
> > 
> > One thing I've noticed in your command is that you lack the @ character before the file name. Your command should look like this:
> > 
> > curl -XPOST '[http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)' -d @lane.json
> > 
> > instead of the one you've pasted.
> > 
> > --  
> > Regards,  
> > Rafał Kuć  
> > Sematext :: [http://sematext.com/](http://sematext.com/) :: Solr - Lucene - Nutch - Elasticsearch
> > 
> > I'm completely new to Elasticsearch and I've been importing data to Elasticsearch up to this point by manually entering the JSON.
> > 
> > I'd like to begin loading in .json files to make things faster and possibly to bulk load in the future. I'm not sure how to do this currently. The .json would be generated from a SQL Server query and formatted as JSON by another layer, and then placed in a folder on the server.
> > 
> > I've attempted to run this code to index the JSON, however I get an error message:
> > 
> > [root@JFBLOUVMLXECS01 ~]# curl -XPOST '[http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)' -d lane.json  
> > {"error":"ElasticSearchParseException[Failed to derive xcontent from (offset=0, length=9): [108, 97, 110, 101, 46, 106, 115, 111, 110]]","status":400}[root@JFBLOUVMLXECS01 ~]#
> > 
> > ## Any help you can provide would be much appreciated. Please keep in mind I'm a total noob with this.
> > 
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![chengji18](https://avatars.discourse-cdn.com/v4/letter/c/a4c791/32.png) [@chengji18](https://discuss.elastic.co/u/chengji18)\
**Post date:** [November 21, 2013, 2:14pm UTC](https://discuss.elastic.co/t/how-to-index-a-json-file/11539/10 "2013-11-21T14:14:11Z")

</div>

Hi Rafal,  
what I do is  
{"index":{"\_index":"test","\_type":"keywords","\_id":"1"}}  
{"keywords":"red"}

and i post as:  
curl -s -XPOST '[http://192.168.213.158:9200/\_bulk](http://192.168.213.158:9200/_bulk)' --data-binary  
@keywords.json  
Get an error:  
{"error":"ActionRequestValidationException[Validation Failed: 1: no  
requests added;]","status":500}

any idea?

在 2013年4月10日星期三UTC+2下午11时49分56秒，Rafał Kuć写道：

> Hello!
> 
> In order to send two documents in the same JSON file you need to use  
> Elasticsearch Bulk API. You can find more information about it here:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/bulk/)
> 
> Basically your document would have to look like this:
> 
> {"index":{"\_index":"test","\_type":"test","\_id":"1"}}  
> {"lane":"M05","routes":160}  
> {"index":{"\_index":"test","\_type":"test","\_id":"2"}}  
> {"lane":"M04","routes":170}
> 
> If the above content would be stored in a file called bulk.json, you can  
> send it using the following command:
> 
> curl -s -XPOST '[http://jfblouvmlxecs01:9200/\_bulk](http://jfblouvmlxecs01:9200/_bulk)' --data-binary  
> @bulk.json
> 
> --  
> Regards,  
> Rafał Kuć  
> Sematext :: [http://sematext.com/](http://sematext.com/) :: Solr - Lucene - Nutch -  
> Elasticsearch
> 
> Thanks. I've tried adding the @ and that works for a very simple JSON  
> document. This is the one I used:  
> {"lane":"M05","routes":160}
> 
> I also tried adding this JSON doc with 2 rows (2 records) like this,  
> however it put both records under the same id:
> 
> {"lane":"M05","routes":160},{"lane":"M04","routes":170}
> 
> How can I do this when I have multiple records in the same .json file?
> 
> On Wednesday, April 10, 2013 5:03:43 PM UTC-4, Rafał Kuć wrote:  
> Hello!
> 
> You can find more information about indexing data here:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/index_/)
> 
> One thing I've noticed in your command is that you lack the @ character  
> before the file name. Your command should look like this:
> 
> curl -XPOST '[http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)' -d @lane.json
> 
> instead of the one you've pasted.
> 
> --  
> Regards,  
> Rafał Kuć  
> Sematext :: [http://sematext.com/](http://sematext.com/) :: Solr - Lucene - Nutch -  
> Elasticsearch
> 
> I'm completely new to Elasticsearch and I've been importing data to  
> Elasticsearch up to this point by manually entering the JSON.
> 
> I'd like to begin loading in .json files to make things faster and  
> possibly to bulk load in the future. I'm not sure how to do this  
> currently. The .json would be generated from a SQL Server query and  
> formatted as JSON by another layer, and then placed in a folder on the  
> server.
> 
> I've attempted to run this code to index the JSON, however I get an error  
> message:
> 
> [root@JFBLOUVMLXECS01 ~]# curl -XPOST '  
> [http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)' -d lane.json  
> {"error":"ElasticSearchParseException[Failed to derive xcontent from  
> (offset=0, length=9): [108, 97, 110, 101, 46, 106, 115, 111,  
> 110]]","status":400}[root@JFBLOUVMLXECS01 ~]#
> 
> ## Any help you can provide would be much appreciated. Please keep in mind I'm a total noob with this.
> 
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 21, 2013, 5:31pm UTC](https://discuss.elastic.co/t/how-to-index-a-json-file/11539/11 "2013-11-21T17:31:40Z")

</div>

Did you add a return after the last body?

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 21 novembre 2013 at 15:14:15, cml ([funny1990525@gmail.com](mailto:funny1990525@gmail.com)) a écrit:

Hi Rafal,  
what I do is  
{"index":{"\_index":"test","\_type":"keywords","\_id":"1"}}  
{"keywords":"red"}

and i post as:  
curl -s -XPOST '[http://192.168.213.158:9200/\_bulk](http://192.168.213.158:9200/_bulk)' --data-binary @keywords.json  
Get an error:  
{"error":"ActionRequestValidationException[Validation Failed: 1: no requests added;]","status":500}

any idea?

在 2013年4月10日星期三UTC+2下午11时49分56秒，Rafał Kuć写道：  
Hello!

In order to send two documents in the same JSON file you need to use ElasticSearch Bulk API. You can find more information about it here: [http://www.elasticsearch.org/guide/reference/api/bulk/](http://www.elasticsearch.org/guide/reference/api/bulk/)

Basically your document would have to look like this:

{"index":{"\_index":"test","\_type":"test","\_id":"1"}}  
{"lane":"M05","routes":160}  
{"index":{"\_index":"test","\_type":"test","\_id":"2"}}  
{"lane":"M04","routes":170}

If the above content would be stored in a file called bulk.json, you can send it using the following command:

curl -s -XPOST '[http://jfblouvmlxecs01:9200/\_bulk](http://jfblouvmlxecs01:9200/_bulk)' --data-binary @bulk.json

--  
Regards,  
Rafał Kuć  
Sematext :: [http://sematext.com/](http://sematext.com/) :: Solr - Lucene - Nutch - ElasticSearch

Thanks. I've tried adding the @ and that works for a very simple JSON document. This is the one I used:  
{"lane":"M05","routes":160}

I also tried adding this JSON doc with 2 rows (2 records) like this, however it put both records under the same id:

{"lane":"M05","routes":160},{"lane":"M04","routes":170}

How can I do this when I have multiple records in the same .json file?

On Wednesday, April 10, 2013 5:03:43 PM UTC-4, Rafał Kuć wrote:  
Hello!

You can find more information about indexing data here: [http://www.elasticsearch.org/guide/reference/api/index\_/](http://www.elasticsearch.org/guide/reference/api/index_/)

One thing I've noticed in your command is that you lack the @ character before the file name. Your command should look like this:

curl -XPOST '[http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)' -d @lane.json

instead of the one you've pasted.

--  
Regards,  
Rafał Kuć  
Sematext :: [http://sematext.com/](http://sematext.com/) :: Solr - Lucene - Nutch - ElasticSearch

I'm completely new to Elasticsearch and I've been importing data to Elasticsearch up to this point by manually entering the JSON.

I'd like to begin loading in .json files to make things faster and possibly to bulk load in the future. I'm not sure how to do this currently. The .json would be generated from a SQL Server query and formatted as JSON by another layer, and then placed in a folder on the server.

I've attempted to run this code to index the JSON, however I get an error message:

[root@JFBLOUVMLXECS01 ~]# curl -XPOST '[http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)' -d lane.json  
{"error":"ElasticSearchParseException[Failed to derive xcontent from (offset=0, length=9): [108, 97, 110, 101, 46, 106, 115, 111, 110]]","status":400}[root@JFBLOUVMLXECS01 ~]#

## Any help you can provide would be much appreciated. Please keep in mind I'm a total noob with this.

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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![PrasathRajan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prasathrajan/32/52874_2.png) [@PrasathRajan](https://discuss.elastic.co/u/PrasathRajan)\
**Post date:** [April 9, 2014, 12:36pm UTC](https://discuss.elastic.co/t/how-to-index-a-json-file/11539/12 "2014-04-09T12:36:24Z")

</div>

Hi david,

My json file contains data like this  
{ "field1" : "value1" }  
{ "field1" : "value2" }  
{ "field1" : "value3" }

Is it possible to index with fsriver?.

My river/index creation as below,

curl -XPUT 'localhost:9200/\_river/security/\_meta' -d '{  
"type":"fs",  
"fs": {  
"url": "/Projects/elasticsearch-1.0.1/JSON/",  
"update\_rate": 1000,  
"json\_support" : "true"  
},

"index":{  
"index":"security",  
"type":"logs",  
"bulk\_size":50  
}  
}

I am keep getting error saying that error 'Error while indexing content  
from /Projects/elasticsearch-1.0.1/JSON/'

Could you please help me out?  
Thanks  
Prasanth.R

On Thursday, November 21, 2013 11:01:40 PM UTC+5:30, David Pilato wrote:

> Did you add a return after the last body?
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 21 novembre 2013 at 15:14:15, cml ([funny1...@gmail.com](mailto:funny1...@gmail.com) \<javascript:\>)  
> a écrit:
> 
> Hi Rafal,  
> what I do is  
> {"index":{"\_index":"test","\_type":"keywords","\_id":"1"}}  
> {"keywords":"red"}
> 
> and i post as:  
> curl -s -XPOST '[http://192.168.213.158:9200/\_bulk](http://192.168.213.158:9200/_bulk)' --data-binary  
> @keywords.json  
> Get an error:  
> {"error":"ActionRequestValidationException[Validation Failed: 1: no  
> requests added;]","status":500}
> 
> any idea?
> 
> 在 2013年4月10日星期三UTC+2下午11时49分56秒，Rafał Kuć写道：
> 
> > Hello!
> > 
> > In order to send two documents in the same JSON file you need to use  
> > Elasticsearch Bulk API. You can find more information about it here:  
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/bulk/)
> > 
> > Basically your document would have to look like this:
> > 
> > {"index":{"\_index":"test","\_type":"test","\_id":"1"}}  
> > {"lane":"M05","routes":160}  
> > {"index":{"\_index":"test","\_type":"test","\_id":"2"}}  
> > {"lane":"M04","routes":170}
> > 
> > If the above content would be stored in a file called bulk.json, you can  
> > send it using the following command:
> > 
> > curl -s -XPOST '[http://jfblouvmlxecs01:9200/\_bulk](http://jfblouvmlxecs01:9200/_bulk)' --data-binary  
> > @bulk.json
> > 
> > --  
> > Regards,  
> > Rafał Kuć  
> > Sematext :: [http://sematext.com/](http://sematext.com/) :: Solr - Lucene - Nutch -  
> > Elasticsearch
> > 
> > Thanks. I've tried adding the @ and that works for a very simple JSON  
> > document. This is the one I used:  
> > {"lane":"M05","routes":160}
> > 
> > I also tried adding this JSON doc with 2 rows (2 records) like this,  
> > however it put both records under the same id:
> > 
> > {"lane":"M05","routes":160},{"lane":"M04","routes":170}
> > 
> > How can I do this when I have multiple records in the same .json file?
> > 
> > On Wednesday, April 10, 2013 5:03:43 PM UTC-4, Rafał Kuć wrote:  
> > Hello!
> > 
> > You can find more information about indexing data here:  
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/index_/)
> > 
> > One thing I've noticed in your command is that you lack the @ character  
> > before the file name. Your command should look like this:
> > 
> > curl -XPOST '[http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)' -d @lane.json
> > 
> > instead of the one you've pasted.
> > 
> > --  
> > Regards,  
> > Rafał Kuć  
> > Sematext :: [http://sematext.com/](http://sematext.com/) :: Solr - Lucene - Nutch -  
> > Elasticsearch
> > 
> > I'm completely new to Elasticsearch and I've been importing data to  
> > Elasticsearch up to this point by manually entering the JSON.
> > 
> > I'd like to begin loading in .json files to make things faster and  
> > possibly to bulk load in the future. I'm not sure how to do this  
> > currently. The .json would be generated from a SQL Server query and  
> > formatted as JSON by another layer, and then placed in a folder on the  
> > server.
> > 
> > I've attempted to run this code to index the JSON, however I get an error  
> > message:
> > 
> > [root@JFBLOUVMLXECS01 ~]# curl -XPOST '  
> > [http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)' -d lane.json  
> > {"error":"ElasticSearchParseException[Failed to derive xcontent from  
> > (offset=0, length=9): [108, 97, 110, 101, 46, 106, 115, 111,  
> > 110]]","status":400}[root@JFBLOUVMLXECS01 ~]#
> > 
> > ## Any help you can provide would be much appreciated. Please keep in mind I'm a total noob with this.
> > 
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/6b1e4ba4-8734-451d-9da5-83b52cafd5f2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6b1e4ba4-8734-451d-9da5-83b52cafd5f2%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 9, 2014, 2:58pm UTC](https://discuss.elastic.co/t/how-to-index-a-json-file/11539/13 "2014-04-09T14:58:17Z")

</div>

No. They are not valid json files.  
You need to provide one json file per document.

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 9 avril 2014 à 14:36:31, Prasanth R ([prasanth.sunrise@gmail.com](mailto:prasanth.sunrise@gmail.com)) a écrit:

Hi david,

My json file contains data like this  
{ "field1" : "value1" }  
{ "field1" : "value2" }  
{ "field1" : "value3" }

Is it possible to index with fsriver?.

My river/index creation as below,

curl -XPUT 'localhost:9200/\_river/security/\_meta' -d '{  
"type":"fs",  
"fs": {  
"url": "/Projects/elasticsearch-1.0.1/JSON/",  
"update\_rate": 1000,  
"json\_support" : "true"  
},

"index":{  
"index":"security",  
"type":"logs",  
"bulk\_size":50  
}  
}

I am keep getting error saying that error 'Error while indexing content from /Projects/elasticsearch-1.0.1/JSON/'

Could you please help me out?  
Thanks  
Prasanth.R

On Thursday, November 21, 2013 11:01:40 PM UTC+5:30, David Pilato wrote:  
Did you add a return after the last body?

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 21 novembre 2013 at 15:14:15, cml ([funny1...@gmail.com](mailto:funny1...@gmail.com)) a écrit:

Hi Rafal,  
what I do is  
{"index":{"\_index":"test","\_type":"keywords","\_id":"1"}}  
{"keywords":"red"}

and i post as:  
curl -s -XPOST '[http://192.168.213.158:9200/\_bulk](http://192.168.213.158:9200/_bulk)' --data-binary @keywords.json  
Get an error:  
{"error":"ActionRequestValidationException[Validation Failed: 1: no requests added;]","status":500}

any idea?

在 2013年4月10日星期三UTC+2下午11时49分56秒，Rafał Kuć写道：  
Hello!

In order to send two documents in the same JSON file you need to use ElasticSearch Bulk API. You can find more information about it here: [http://www.elasticsearch.org/guide/reference/api/bulk/](http://www.elasticsearch.org/guide/reference/api/bulk/)

Basically your document would have to look like this:

{"index":{"\_index":"test","\_type":"test","\_id":"1"}}  
{"lane":"M05","routes":160}  
{"index":{"\_index":"test","\_type":"test","\_id":"2"}}  
{"lane":"M04","routes":170}

If the above content would be stored in a file called bulk.json, you can send it using the following command:

curl -s -XPOST '[http://jfblouvmlxecs01:9200/\_bulk](http://jfblouvmlxecs01:9200/_bulk)' --data-binary @bulk.json

--  
Regards,  
Rafał Kuć  
Sematext :: [http://sematext.com/](http://sematext.com/) :: Solr - Lucene - Nutch - ElasticSearch

Thanks. I've tried adding the @ and that works for a very simple JSON document. This is the one I used:  
{"lane":"M05","routes":160}

I also tried adding this JSON doc with 2 rows (2 records) like this, however it put both records under the same id:

{"lane":"M05","routes":160},{"lane":"M04","routes":170}

How can I do this when I have multiple records in the same .json file?

On Wednesday, April 10, 2013 5:03:43 PM UTC-4, Rafał Kuć wrote:  
Hello!

You can find more information about indexing data here: [http://www.elasticsearch.org/guide/reference/api/index\_/](http://www.elasticsearch.org/guide/reference/api/index_/)

One thing I've noticed in your command is that you lack the @ character before the file name. Your command should look like this:

curl -XPOST '[http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)' -d @lane.json

instead of the one you've pasted.

--  
Regards,  
Rafał Kuć  
Sematext :: [http://sematext.com/](http://sematext.com/) :: Solr - Lucene - Nutch - ElasticSearch

I'm completely new to Elasticsearch and I've been importing data to Elasticsearch up to this point by manually entering the JSON.

I'd like to begin loading in .json files to make things faster and possibly to bulk load in the future. I'm not sure how to do this currently. The .json would be generated from a SQL Server query and formatted as JSON by another layer, and then placed in a folder on the server.

I've attempted to run this code to index the JSON, however I get an error message:

[root@JFBLOUVMLXECS01 ~]# curl -XPOST '[http://jfblouvmlxecs01:9200/test/test/1](http://jfblouvmlxecs01:9200/test/test/1)' -d lane.json  
{"error":"ElasticSearchParseException[Failed to derive xcontent from (offset=0, length=9): [108, 97, 110, 101, 46, 106, 115, 111, 110]]","status":400}[root@JFBLOUVMLXECS01 ~]#

## Any help you can provide would be much appreciated. Please keep in mind I'm a total noob with this.

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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

## -- 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/6b1e4ba4-8734-451d-9da5-83b52cafd5f2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6b1e4ba4-8734-451d-9da5-83b52cafd5f2%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.53456009.2901d82.164d%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53456009.2901d82.164d%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:37am UTC](https://discuss.elastic.co/t/how-to-index-a-json-file/11539/14 "2017-07-06T01:37:14Z")

</div>


