# Best way to index a vertical file

**URL:** <https://discuss.elastic.co/t/best-way-to-index-a-vertical-file/64618>\
**Category:** Elasticsearch\
**Created:** [November 1, 2016, 7:06pm UTC](https://discuss.elastic.co/t/best-way-to-index-a-vertical-file/64618 "2016-11-01T19:06:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmoxam](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@mmoxam](https://discuss.elastic.co/u/mmoxam)\
**Post date:** [November 1, 2016, 7:06pm UTC](https://discuss.elastic.co/t/best-way-to-index-a-vertical-file/64618/1 "2016-11-01T19:06:12Z")

</div>

using the below example:

--vertfile.txt  
id|10331  
name|apple  
date|green  
DOC  
id|10332  
name|banana  
date|yellow  
DOC  
id|10331  
name|apple  
date|green

What's the best way to ingest a vertical file?

Ingest Node with custom pipeline or logstash with some fancy filter?

---

<div class="post-metadata">

**Author:** ![cbuescher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbuescher/32/60402_2.png) [@cbuescher](https://discuss.elastic.co/u/cbuescher)\
**Post date:** [November 1, 2016, 9:14pm UTC](https://discuss.elastic.co/t/best-way-to-index-a-vertical-file/64618/2 "2016-11-01T21:14:10Z")

</div>

To use Ingest Node, you at least need some json document that you send via the REST api, so you need to at least convert your file to json. I don't know logstash well enough to come up with a multi-line filter for this thing, better ask in the [Logstash Forum](https://discuss.elastic.co/c/logstash) about that. Why not use one of the script language clients like the perl client, the php client or the python client to do the file parsing and sent the resulting docs to ES?

---

<div class="post-metadata">

**Author:** ![mmoxam](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@mmoxam](https://discuss.elastic.co/u/mmoxam)\
**Post date:** [November 1, 2016, 9:17pm UTC](https://discuss.elastic.co/t/best-way-to-index-a-vertical-file/64618/3 "2016-11-01T21:17:05Z")

</div>

So the ingest node only accepts JSON?  
Yes the script clients are solid choices and perhaps the most straight forward option.

Ill check the log stash boards like you said.

---

<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 5, 2017, 10:07pm UTC](https://discuss.elastic.co/t/best-way-to-index-a-vertical-file/64618/4 "2017-07-05T22:07:41Z")

</div>

Closed on July 5, 2017, 10:07pm UTC


