# Not able to index array in logstash

**URL:** https://discuss.elastic.co/t/not-able-to-index-array-in-logstash/338774
**Category:** Logstash
**Created:** [July 19, 2023, 11:11am UTC](https://discuss.elastic.co/t/not-able-to-index-array-in-logstash/338774 "2023-07-19T11:11:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Mohit\_Gupta2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mohit_gupta2/32/123579_2.png) [@Mohit\_Gupta2](https://discuss.elastic.co/u/Mohit_Gupta2)
#### Post date: [July 19, 2023, 11:11am UTC](https://discuss.elastic.co/t/not-able-to-index-array-in-logstash/338774/1 "2023-07-19T11:11:40Z")

</div>

As it says, Logstash is not able to index array of strings or any kind of string for that matter.  
eg. - country :["some\_name"] is not mapped while country: '["some\_name"]' is indexed although it is showing the unmapped field in log\_entry .  
logstash.conf

```auto
input {
  mongodb {
    uri => "mongo_uri"
    placeholder_db_dir => "/usr/share/logstash/"
    placeholder_db_name => "logstash_sqlite.db"
    collection => "test"
    batch_size => 50000
  }
}

 

filter {
  mutate {
    remove_field => ["_id"]
  }
}
output {
  elasticsearch {
    hosts => ["http://ip:9200/"]
    index => "test"
  }

```

---

<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 16, 2023, 11:12am UTC](https://discuss.elastic.co/t/not-able-to-index-array-in-logstash/338774/2 "2023-08-16T11:12:17Z")

</div>

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