xxBedy/elasticsearch-river-csv — pull request #10 by Igneous (2014-03-06 22:05:45+00:00)
Title: Add a "skip $x lines" feature.

Here's the usecase for this:
![csv](https://f.cloud.github.com/assets/113178/2350994/43e037f2-a577-11e3-9a69-0865722ce138.png)

I have a horrible blackbox piece of software which generates call detail records in CSV format, and uploads them over ftp to an ftp server. I have absolutely no way to control the CSVs it generates, apart from manipulating them after the fact.

This sucks, because elasticsearch-river-csv is the perfect way to index this data, but if I were to use the river plugin as-is, I'd end up indexing a bunch of bogus documents with the value of "INTEGER" and such.

In this pull request, I've added a feature to ignore the first $x lines of a csv. With it, I can use an river with a _meta of:
```
{
"type" : "csv",
"csv_file" : {
"folder" : "/tmp/csv",
"first_line_is_header":"true",
"ignore_first_lines": 1,
"poll": "1m"
}
}
````
With this config, first_line_is_header will offset ignore_first_lines; so the first line AFTER the header is skipped, and only the relevant data is inserted. Likewise, if ```"first_line_is_header":"false"``` is set, ignore_first_lines will ignore the very first line of the document.

Anyway, I just thought I'd push this back upstream. Feel free to reject this, I know it's of limited usefulness, but it would certainly be nice if I didn't have to maintain my own patchset against your code for this.