# How do I avoid indexing through comma's between "\<\<\>\>" in my CSV files

**URL:** https://discuss.elastic.co/t/how-do-i-avoid-indexing-through-commas-between-in-my-csv-files/90862
**Category:** Logstash
**Created:** [June 26, 2017, 5:48pm UTC](https://discuss.elastic.co/t/how-do-i-avoid-indexing-through-commas-between-in-my-csv-files/90862 "2017-06-26T17:48:24Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![RajeshGarre](https://avatars.discourse-cdn.com/v4/letter/r/c2a13f/32.png) [@RajeshGarre](https://discuss.elastic.co/u/RajeshGarre)
#### Post date: [June 26, 2017, 5:48pm UTC](https://discuss.elastic.co/t/how-do-i-avoid-indexing-through-commas-between-in-my-csv-files/90862/1 "2017-06-26T17:48:24Z")

</div>

I am new to logstash and I am trying to create a Conf File with CSV file as source. The CSV file contains field values within \<\<\>\>\> that are also comma separated which should be treated as one field. How do I avoid indexing for the fields between '\<\<\>\>' which are also comma separated?

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [June 27, 2017, 8:14pm UTC](https://discuss.elastic.co/t/how-do-i-avoid-indexing-through-commas-between-in-my-csv-files/90862/2 "2017-06-27T20:14:47Z")

</div>

To avoid misunderstandings, could you show an example and what fields you'd like to extract from that example?

---

<div class="post-metadata">

### Author: ![Amit2015](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@Amit2015](https://discuss.elastic.co/u/Amit2015)
#### Post date: [June 27, 2017, 11:36pm UTC](https://discuss.elastic.co/t/how-do-i-avoid-indexing-through-commas-between-in-my-csv-files/90862/4 "2017-06-27T23:36:42Z")

</div>

Sample log:  
1,2,3,4,\<,5,6,7,8,\>,9,10  
It should remove comma's between \< \> with empty space.  
so the result should look like 1,2,3,4,\< 5 6 7 8 \>,9,10

Please suggest...

Thanks!

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [June 28, 2017, 3:37am UTC](https://discuss.elastic.co/t/how-do-i-avoid-indexing-through-commas-between-in-my-csv-files/90862/5 "2017-06-28T03:37:30Z")

</div>

Hmm. Maybe you can use the csv filter's `quote_char` option for this. Try setting it to `[<>]`. If that doesn't work I don't know if there's anything that can be done (short of a ruby filter with some custom code).

---

<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 26, 2017, 3:37am UTC](https://discuss.elastic.co/t/how-do-i-avoid-indexing-through-commas-between-in-my-csv-files/90862/6 "2017-07-26T03:37:39Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
