# Location array object not indexed with logstash

**URL:** https://discuss.elastic.co/t/location-array-object-not-indexed-with-logstash/228717
**Category:** Logstash
**Created:** [April 19, 2020, 10:19am UTC](https://discuss.elastic.co/t/location-array-object-not-indexed-with-logstash/228717 "2020-04-19T10:19:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Jalil](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@Jalil](https://discuss.elastic.co/u/Jalil)
#### Post date: [April 19, 2020, 10:19am UTC](https://discuss.elastic.co/t/location-array-object-not-indexed-with-logstash/228717/1 "2020-04-19T10:19:28Z")

</div>

Bonjour,

j'ai une collection mongodb contenant des documents dont un des objets est un array de coordonnées.  
voici un extract de mon mapping template :

```auto
{
  "_doc": {
    "_meta": {},
    "_source": {},
    "properties": {
      "distance": {
        "type": "long"
      },
      "departure_city": {
        "type": "text",
        "fields": {
          "keyword": {
            "ignore_above": 256,
            "type": "keyword"
          }
        }
      },
      "arrival_in": {
        "ignore_malformed": true,
        "type": "geo_point",
        "ignore_z_value": true
      },
...

```

Voici ma config logstash :

```auto
# config pour intégrer des données mongodb dans ES

input{
  mongodb {
    uri => 'mongodb://localhost:27017/trips'
    placeholder_db_dir => 'C:\datadb\logstash-mongodb'
    placeholder_db_name => 'logstash_sqlite.db'
    collection => 'trip'
    batch_size => 5000
  }
}

filter{

	mutate {
		copy => { "_id" => "[@metadata][_id]"}
		remove_field => ["_id"]
	}
}

output{
elasticsearch {
	manage_template => "false"
    #document_type => "stop"
    #template_overwrite => "true"
    template_name=>"trip-template"
	hosts => ["localhost:9200"]
	index => "trip-3-%{+YYYY.MM.dd}"
	}
	stdout { codec => rubydebug }
}

```

Voici un exemple de document mongodb à indexer :

```auto
{
    "_id" : ObjectId("5e89cca6bf8ce1de0e13fa19"),
    "departure_at" : ISODate("2019-03-18T14:27:46.000Z"),
    "departure_place" : null,
    "departure_city" : "Tina",
    "distance" : 119,
    "duration" : 13231,
    "fuel_consumption" : null,
    "arrival_at" : ISODate("2019-03-18T18:08:17.000Z"),
    "arrival_in" : [ 
        10.1039266666667, 
        33.889845
    ],
    "arrival_place" : null,
    "arrival_city" : "Gabes Medina"
}

```

Je veux que Elasticsearch reconnaisse l'array "arrival\_in" en tant geo\_point provenant d'un array (je sais que lon et lat sont inversés ici).  
Résultat obtenu dans l'index : Je ne retrouve pas "arrival\_in" ni ses valeurs.

Merci d'avance.  
Jalil

---

<div class="post-metadata">

### Author: ![Jalil](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@Jalil](https://discuss.elastic.co/u/Jalil)
#### Post date: [April 25, 2020, 12:24pm UTC](https://discuss.elastic.co/t/location-array-object-not-indexed-with-logstash/228717/2 "2020-04-25T12:24:53Z")

</div>

qlq1 pourrait m'aider svp ? je suis bloqué.

---

<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: [May 23, 2020, 12:24pm UTC](https://discuss.elastic.co/t/location-array-object-not-indexed-with-logstash/228717/3 "2020-05-23T12:24:56Z")

</div>

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