# How to index a csv file with Elastic Search

**URL:** <https://discuss.elastic.co/t/how-to-index-a-csv-file-with-elastic-search/16083>\
**Category:** Elasticsearch\
**Created:** [March 1, 2014, 1:07am UTC](https://discuss.elastic.co/t/how-to-index-a-csv-file-with-elastic-search/16083 "2014-03-01T01:07:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![vb2008a](https://avatars.discourse-cdn.com/v4/letter/v/c5a1d2/32.png) [@vb2008a](https://discuss.elastic.co/u/vb2008a)\
**Post date:** [March 1, 2014, 1:07am UTC](https://discuss.elastic.co/t/how-to-index-a-csv-file-with-elastic-search/16083/1 "2014-03-01T01:07:13Z")

</div>

I am a nebiew to elastic search. I have eleastic search and head running on  
a VM. Can someone point me to the steps to index a csv file and search from  
it.  
Your asistance would be greatly appreciated.  
Thanks,  
Vidya

--  
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/00ea65f8-2f4c-40d3-b5b9-bf56e8b70000%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/00ea65f8-2f4c-40d3-b5b9-bf56e8b70000%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Raffaele\_Sena](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raffaele_sena/32/1759_2.png) [@Raffaele\_Sena](https://discuss.elastic.co/u/Raffaele_Sena)\
**Post date:** [March 1, 2014, 1:29am UTC](https://discuss.elastic.co/t/how-to-index-a-csv-file-with-elastic-search/16083/2 "2014-03-01T01:29:03Z")

</div>

What kind of queries would you want to be performing ?

If you just want to search for any record containing the search terms you  
pass, then you can just index the CSV records as single strings. You still  
need to wrap them in a JSON "document", but it can be  
{"record":"csv-record-thingy"}.

If you want to be able to search or return specific fields, you'll have to  
convert the CSV records into JSON objects like: {"field1": "value1",  
"field2", "value2", ...} or whatever your field names are.

-- Raffaele

On Fri, Feb 28, 2014 at 5:07 PM, [vb2008a@gmail.com](mailto:vb2008a@gmail.com) wrote:

> I am a nebiew to Elasticsearch. I have eleastic search and head running  
> on a VM. Can someone point me to the steps to index a csv file and search  
> from it.  
> Your asistance would be greatly appreciated.  
> Thanks,  
> Vidya
> 
> --  
> 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/00ea65f8-2f4c-40d3-b5b9-bf56e8b70000%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/00ea65f8-2f4c-40d3-b5b9-bf56e8b70000%40googlegroups.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/CANKfucYsAnsG%3DGq32H5snVv4PXwHPut1-Be0Da9jA%2BOuOP2NRw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CANKfucYsAnsG%3DGq32H5snVv4PXwHPut1-Be0Da9jA%2BOuOP2NRw%40mail.gmail.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:** [March 1, 2014, 4:12am UTC](https://discuss.elastic.co/t/how-to-index-a-csv-file-with-elastic-search/16083/3 "2014-03-01T04:12:23Z")

</div>

You can also look at [GitHub - AgileWorksOrg/elasticsearch-river-csv: CSV river for ElasticSearch](https://github.com/xxBedy/elasticsearch-river-csv)

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

Le 1 mars 2014 à 02:29, Raffaele Sena [raff367@gmail.com](mailto:raff367@gmail.com) a écrit :

What kind of queries would you want to be performing ?

If you just want to search for any record containing the search terms you pass, then you can just index the CSV records as single strings. You still need to wrap them in a JSON "document", but it can be {"record":"csv-record-thingy"}.

If you want to be able to search or return specific fields, you'll have to convert the CSV records into JSON objects like: {"field1": "value1", "field2", "value2", ...} or whatever your field names are.

-- Raffaele

> On Fri, Feb 28, 2014 at 5:07 PM, [vb2008a@gmail.com](mailto:vb2008a@gmail.com) wrote:  
> I am a nebiew to Elasticsearch. I have eleastic search and head running on a VM. Can someone point me to the steps to index a csv file and search from it.  
> Your asistance would be greatly appreciated.  
> Thanks,  
> Vidya
> 
> --  
> 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/00ea65f8-2f4c-40d3-b5b9-bf56e8b70000%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/00ea65f8-2f4c-40d3-b5b9-bf56e8b70000%40googlegroups.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/CANKfucYsAnsG%3DGq32H5snVv4PXwHPut1-Be0Da9jA%2BOuOP2NRw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CANKfucYsAnsG%3DGq32H5snVv4PXwHPut1-Be0Da9jA%2BOuOP2NRw%40mail.gmail.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/5ADDA025-9927-4959-BA17-0D9337288381%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/5ADDA025-9927-4959-BA17-0D9337288381%40pilato.fr).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![David\_Zabner](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@David\_Zabner](https://discuss.elastic.co/u/David_Zabner)\
**Post date:** [July 15, 2014, 3:55pm UTC](https://discuss.elastic.co/t/how-to-index-a-csv-file-with-elastic-search/16083/4 "2014-07-15T15:55:49Z")

</div>

I don't quite understand how to use the river-csv tool.

I am passing it this:

curl -XPUT localhost:9200/\_river/my\_csv\_river/\_meta -d '

{

```
"type" : "csv",

"csv_file" : {

    "folder" : "/home/ec2-user/tweets",

    "first_line_is_header":"true"

},

"index" : {

    "index" : "categories",

    "type" : "tweet",

    "bulk_size" : 100,

    "bulk_threshold" : 10

}

```

}

and nothing is showing up.

Help!

On Friday, February 28, 2014 11:12:23 PM UTC-5, David Pilato wrote:

> You can also look at [GitHub - AgileWorksOrg/elasticsearch-river-csv: CSV river for ElasticSearch](https://github.com/xxBedy/elasticsearch-river-csv)
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 1 mars 2014 à 02:29, Raffaele Sena \<[raf...@gmail.com](mailto:raf...@gmail.com) \<javascript:\>\> a  
> écrit :
> 
> What kind of queries would you want to be performing ?
> 
> If you just want to search for any record containing the search terms you  
> pass, then you can just index the CSV records as single strings. You still  
> need to wrap them in a JSON "document", but it can be  
> {"record":"csv-record-thingy"}.
> 
> If you want to be able to search or return specific fields, you'll have to  
> convert the CSV records into JSON objects like: {"field1": "value1",  
> "field2", "value2", ...} or whatever your field names are.
> 
> -- Raffaele
> 
> On Fri, Feb 28, 2014 at 5:07 PM, \<[vb2...@gmail.com](mailto:vb2...@gmail.com) \<javascript:\>\> wrote:
> 
> > I am a nebiew to Elasticsearch. I have eleastic search and head running  
> > on a VM. Can someone point me to the steps to index a csv file and search  
> > from it.  
> > Your asistance would be greatly appreciated.  
> > Thanks,  
> > Vidya
> > 
> > --  
> > 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:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/00ea65f8-2f4c-40d3-b5b9-bf56e8b70000%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/00ea65f8-2f4c-40d3-b5b9-bf56e8b70000%40googlegroups.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:\>.  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CANKfucYsAnsG%3DGq32H5snVv4PXwHPut1-Be0Da9jA%2BOuOP2NRw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CANKfucYsAnsG%3DGq32H5snVv4PXwHPut1-Be0Da9jA%2BOuOP2NRw%40mail.gmail.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/ca0bdd96-55a4-49f5-bd12-26a9e4a748a9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ca0bdd96-55a4-49f5-bd12-26a9e4a748a9%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:** [July 15, 2014, 4:33pm UTC](https://discuss.elastic.co/t/how-to-index-a-csv-file-with-elastic-search/16083/5 "2014-07-15T16:33:27Z")

</div>

What gives /categories/\_search

How many lines do you have in your csv file?  
May be folder requires a ending /

Anything in logs?

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

Le 15 juil. 2014 à 17:55, David Zabner [david.zabner@gmail.com](mailto:david.zabner@gmail.com) a écrit :

I don't quite understand how to use the river-csv tool.

I am passing it this:  
curl -XPUT localhost:9200/\_river/my\_csv\_river/\_meta -d '

{

```
"type" : "csv",

"csv_file" : {

    "folder" : "/home/ec2-user/tweets",

    "first_line_is_header":"true"

},

"index" : {

    "index" : "categories",

    "type" : "tweet",

    "bulk_size" : 100,

    "bulk_threshold" : 10

}

```

}

and nothing is showing up.

Help!

> On Friday, February 28, 2014 11:12:23 PM UTC-5, David Pilato wrote:  
> You can also look at [GitHub - AgileWorksOrg/elasticsearch-river-csv: CSV river for ElasticSearch](https://github.com/xxBedy/elasticsearch-river-csv)
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 1 mars 2014 à 02:29, Raffaele Sena [raf...@gmail.com](mailto:raf...@gmail.com) a écrit :
> 
> What kind of queries would you want to be performing ?
> 
> If you just want to search for any record containing the search terms you pass, then you can just index the CSV records as single strings. You still need to wrap them in a JSON "document", but it can be {"record":"csv-record-thingy"}.
> 
> If you want to be able to search or return specific fields, you'll have to convert the CSV records into JSON objects like: {"field1": "value1", "field2", "value2", ...} or whatever your field names are.
> 
> -- Raffaele
> 
> > On Fri, Feb 28, 2014 at 5:07 PM, [vb2...@gmail.com](mailto:vb2...@gmail.com) wrote:  
> > I am a nebiew to Elasticsearch. I have eleastic search and head running on a VM. Can someone point me to the steps to index a csv file and search from it.  
> > Your asistance would be greatly appreciated.  
> > Thanks,  
> > Vidya
> > 
> > --  
> > 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).  
> > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/00ea65f8-2f4c-40d3-b5b9-bf56e8b70000%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/00ea65f8-2f4c-40d3-b5b9-bf56e8b70000%40googlegroups.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).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CANKfucYsAnsG%3DGq32H5snVv4PXwHPut1-Be0Da9jA%2BOuOP2NRw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CANKfucYsAnsG%3DGq32H5snVv4PXwHPut1-Be0Da9jA%2BOuOP2NRw%40mail.gmail.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/ca0bdd96-55a4-49f5-bd12-26a9e4a748a9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ca0bdd96-55a4-49f5-bd12-26a9e4a748a9%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/9A4E7AC9-6D06-4164-8666-65AD4C2E7910%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/9A4E7AC9-6D06-4164-8666-65AD4C2E7910%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![David\_Zabner](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@David\_Zabner](https://discuss.elastic.co/u/David_Zabner)\
**Post date:** [July 15, 2014, 6:05pm UTC](https://discuss.elastic.co/t/how-to-index-a-csv-file-with-elastic-search/16083/6 "2014-07-15T18:05:39Z")

</div>

categories/\_search returns:  
{

- error: "IndexMissingException[[categories] missing]",
- status: 404

}

The logs do not seem to contain anything.

Am I supposed to input the data via curl as well?

On Tuesday, July 15, 2014 12:34:22 PM UTC-4, David Pilato wrote:

> What gives /categories/\_search
> 
> How many lines do you have in your csv file?  
> May be folder requires a ending /
> 
> Anything in logs?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 15 juil. 2014 à 17:55, David Zabner \<[david....@gmail.com](mailto:david....@gmail.com) \<javascript:\>\>  
> a écrit :
> 
> I don't quite understand how to use the river-csv tool.
> 
> I am passing it this:
> 
> curl -XPUT localhost:9200/\_river/my\_csv\_river/\_meta -d '
> 
> {
> 
> ```
> "type" : "csv",
> 
> "csv_file" : {
> 
> "folder" : "/home/ec2-user/tweets",
> 
> "first_line_is_header":"true"
> 
> },
> 
> "index" : {
> 
> "index" : "categories",
> 
> "type" : "tweet",
> 
> "bulk_size" : 100,
> 
> "bulk_threshold" : 10
> 
> }
> 
> ```
> 
> }
> 
> and nothing is showing up.
> 
> Help!
> 
> On Friday, February 28, 2014 11:12:23 PM UTC-5, David Pilato wrote:
> 
> > You can also look at [GitHub - AgileWorksOrg/elasticsearch-river-csv: CSV river for ElasticSearch](https://github.com/xxBedy/elasticsearch-river-csv)
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 1 mars 2014 à 02:29, Raffaele Sena [raf...@gmail.com](mailto:raf...@gmail.com) a écrit :
> > 
> > What kind of queries would you want to be performing ?
> > 
> > If you just want to search for any record containing the search terms you  
> > pass, then you can just index the CSV records as single strings. You still  
> > need to wrap them in a JSON "document", but it can be  
> > {"record":"csv-record-thingy"}.
> > 
> > If you want to be able to search or return specific fields, you'll have  
> > to convert the CSV records into JSON objects like: {"field1": "value1",  
> > "field2", "value2", ...} or whatever your field names are.
> > 
> > -- Raffaele
> > 
> > On Fri, Feb 28, 2014 at 5:07 PM, [vb2...@gmail.com](mailto:vb2...@gmail.com) wrote:
> > 
> > > I am a nebiew to Elasticsearch. I have eleastic search and head running  
> > > on a VM. Can someone point me to the steps to index a csv file and search  
> > > from it.  
> > > Your asistance would be greatly appreciated.  
> > > Thanks,  
> > > Vidya
> > > 
> > > --  
> > > 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).  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/00ea65f8-2f4c-40d3-b5b9-bf56e8b70000%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/00ea65f8-2f4c-40d3-b5b9-bf56e8b70000%40googlegroups.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).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/CANKfucYsAnsG%3DGq32H5snVv4PXwHPut1-Be0Da9jA%2BOuOP2NRw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CANKfucYsAnsG%3DGq32H5snVv4PXwHPut1-Be0Da9jA%2BOuOP2NRw%40mail.gmail.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:\>.  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/ca0bdd96-55a4-49f5-bd12-26a9e4a748a9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ca0bdd96-55a4-49f5-bd12-26a9e4a748a9%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/ca0bdd96-55a4-49f5-bd12-26a9e4a748a9%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/ca0bdd96-55a4-49f5-bd12-26a9e4a748a9%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> 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/be71dbc0-e78d-44f8-8f00-0b5dc55e0eb1%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/be71dbc0-e78d-44f8-8f00-0b5dc55e0eb1%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:** [July 15, 2014, 7:32pm UTC](https://discuss.elastic.co/t/how-to-index-a-csv-file-with-elastic-search/16083/7 "2014-07-15T19:32:54Z")

</div>

I think it should work.  
May be you should create a ticket on the plugin repo.

Still, you should provide more details. For example, hits your logs, your CSV file, …  
Also, check that your elasticsearch process has read access to your directory.

No more idea though

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

Le 15 juillet 2014 à 20:05:44, David Zabner ([david.zabner@gmail.com](mailto:david.zabner@gmail.com)) a écrit:

categories/\_search returns:  
{  
error: "IndexMissingException[[categories] missing]",  
status: 404  
}

The logs do not seem to contain anything.

Am I supposed to input the data via curl as well?

On Tuesday, July 15, 2014 12:34:22 PM UTC-4, David Pilato wrote:  
What gives /categories/\_search

How many lines do you have in your csv file?  
May be folder requires a ending /

Anything in logs?

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

Le 15 juil. 2014 à 17:55, David Zabner [david....@gmail.com](mailto:david....@gmail.com) a écrit :

I don't quite understand how to use the river-csv tool.

I am passing it this:  
curl -XPUT localhost:9200/\_river/my\_csv\_river/\_meta -d '

{

```
"type" : "csv",

"csv_file" : {

    "folder" : "/home/ec2-user/tweets",

    "first_line_is_header":"true"

},

"index" : {

    "index" : "categories",

    "type" : "tweet",

    "bulk_size" : 100,

    "bulk_threshold" : 10

}

```

}

and nothing is showing up.

Help!

On Friday, February 28, 2014 11:12:23 PM UTC-5, David Pilato wrote:  
You can also look at [https://github.com/xxBedy/elasticsearch-river-csv](https://github.com/xxBedy/elasticsearch-river-csv)

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

Le 1 mars 2014 à 02:29, Raffaele Sena [raf...@gmail.com](mailto:raf...@gmail.com) a écrit :

What kind of queries would you want to be performing ?

If you just want to search for any record containing the search terms you pass, then you can just index the CSV records as single strings. You still need to wrap them in a JSON "document", but it can be {"record":"csv-record-thingy"}.

If you want to be able to search or return specific fields, you'll have to convert the CSV records into JSON objects like: {"field1": "value1", "field2", "value2", ...} or whatever your field names are.

-- Raffaele

On Fri, Feb 28, 2014 at 5:07 PM, [vb2...@gmail.com](mailto:vb2...@gmail.com) wrote:  
I am a nebiew to elastic search. I have eleastic search and head running on a VM. Can someone point me to the steps to index a csv file and search from it.  
Your asistance would be greatly appreciated.  
Thanks,  
Vidya

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/00ea65f8-2f4c-40d3-b5b9-bf56e8b70000%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/00ea65f8-2f4c-40d3-b5b9-bf56e8b70000%40googlegroups.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). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CANKfucYsAnsG%3DGq32H5snVv4PXwHPut1-Be0Da9jA%2BOuOP2NRw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CANKfucYsAnsG%3DGq32H5snVv4PXwHPut1-Be0Da9jA%2BOuOP2NRw%40mail.gmail.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). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/ca0bdd96-55a4-49f5-bd12-26a9e4a748a9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ca0bdd96-55a4-49f5-bd12-26a9e4a748a9%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/be71dbc0-e78d-44f8-8f00-0b5dc55e0eb1%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/be71dbc0-e78d-44f8-8f00-0b5dc55e0eb1%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.53c581e7.6ceaf087.70e%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53c581e7.6ceaf087.70e%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:15am UTC](https://discuss.elastic.co/t/how-to-index-a-csv-file-with-elastic-search/16083/8 "2017-07-06T01:15:38Z")

</div>


