# Unable to index the array(from mongodb) using the logstash

**URL:** https://discuss.elastic.co/t/unable-to-index-the-array-from-mongodb-using-the-logstash/125740
**Category:** Logstash
**Created:** [March 27, 2018, 11:36am UTC](https://discuss.elastic.co/t/unable-to-index-the-array-from-mongodb-using-the-logstash/125740 "2018-03-27T11:36:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![surendar27](https://avatars.discourse-cdn.com/v4/letter/s/f19dbf/32.png) [@surendar27](https://discuss.elastic.co/u/surendar27)
#### Post date: [March 27, 2018, 11:36am UTC](https://discuss.elastic.co/t/unable-to-index-the-array-from-mongodb-using-the-logstash/125740/1 "2018-03-27T11:36:16Z")

</div>

Hi, I am unable to index the array in elasticsearch using logstash. I have tried the split option but no luck. Below is the format of data i have(i.e is coming from mongodb),

{"\_id"=\>BSON::ObjectId('5ab4f8fc36e9ca09d4cfcee2'), "manager\_upi"=\>"000018780", "supervisor\_id"=\>"000064862", "mailstop"=\>"MC 4-418", "supervisor\_name"=\>"Nagaraja Rao Harshadeep,surendar,raji,kamal,arjun,tamizh", "projcountryname"=\>["World", "World", "World", "World", "South Sudan"], "workoudesc"=\>"ENR GP GLOBAL (GENGE)", "lname"=\>"Guzman Hidalgo", "workou"=\>"GENGE", "projdesc"=\>[" GAFSP ", " GEO OPS ", " LLIIL Open Aid Partnership (OAP) "]}

Issue here is like i can able to index the key value kind of records but unable to index the projcountryname & projdesc fields.

planning to use the ruby filter in logstash, please help me on resolving this issue.

---

<div class="post-metadata">

### Author: ![surendar27](https://avatars.discourse-cdn.com/v4/letter/s/f19dbf/32.png) [@surendar27](https://discuss.elastic.co/u/surendar27)
#### Post date: [March 29, 2018, 9:32am UTC](https://discuss.elastic.co/t/unable-to-index-the-array-from-mongodb-using-the-logstash/125740/2 "2018-03-29T09:32:26Z")

</div>

@magnusbaeck, Please help me on this issue. ruby is the best option but im struck in the ruby 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: [April 26, 2018, 9:32am UTC](https://discuss.elastic.co/t/unable-to-index-the-array-from-mongodb-using-the-logstash/125740/3 "2018-04-26T09:32:34Z")

</div>

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