# Map the lookup fields from the CSV to precreated index

**URL:** https://discuss.elastic.co/t/map-the-lookup-fields-from-the-csv-to-precreated-index/189079
**Category:** Logstash
**Created:** [July 5, 2019, 11:06am UTC](https://discuss.elastic.co/t/map-the-lookup-fields-from-the-csv-to-precreated-index/189079 "2019-07-05T11:06:10Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![shrikantgulia](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@shrikantgulia](https://discuss.elastic.co/u/shrikantgulia)
#### Post date: [July 5, 2019, 11:06am UTC](https://discuss.elastic.co/t/map-the-lookup-fields-from-the-csv-to-precreated-index/189079/1 "2019-07-05T11:06:11Z")

</div>

Hello,

I need to map the fields existing in my index to a lookup file.  
For eg: In index i am having field=value and in a csv i have value=name , so i need to map field=name. How can this be achieved.

So basically whenever I am searching field , i should also get name as result.

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [July 5, 2019, 3:15pm UTC](https://discuss.elastic.co/t/map-the-lookup-fields-from-the-csv-to-precreated-index/189079/2 "2019-07-05T15:15:37Z")

</div>

Use a [translate](https://www.elastic.co/guide/en/logstash/current/plugins-filters-translate.html) filter.

---

<div class="post-metadata">

### Author: ![shrikantgulia](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@shrikantgulia](https://discuss.elastic.co/u/shrikantgulia)
#### Post date: [July 7, 2019, 4:58pm UTC](https://discuss.elastic.co/t/map-the-lookup-fields-from-the-csv-to-precreated-index/189079/3 "2019-07-07T16:58:59Z")

</div>

@Badger  
thankyou for the response  
i used translate filter  
but my data is doubled as of the source index and after that in destination also the same data  
so  
any way to avaoid

Regards

---

<div class="post-metadata">

### Author: ![sjabiulla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sjabiulla/32/48429_2.png) [@sjabiulla](https://discuss.elastic.co/u/sjabiulla)
#### Post date: [July 8, 2019, 10:37am UTC](https://discuss.elastic.co/t/map-the-lookup-fields-from-the-csv-to-precreated-index/189079/4 "2019-07-08T10:37:43Z")

</div>

You can use the [mutate](https://www.elastic.co/guide/en/logstash/current/plugins-filters-mutate.html#plugins-filters-mutate-remove_field) filter to remove unwanted fields.

---

<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: [August 5, 2019, 10:37am UTC](https://discuss.elastic.co/t/map-the-lookup-fields-from-the-csv-to-precreated-index/189079/5 "2019-08-05T10:37:48Z")

</div>

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