# How to index these documents

**URL:** <https://discuss.elastic.co/t/how-to-index-these-documents/95895>\
**Category:** Elasticsearch\
**Created:** [August 4, 2017, 2:16pm UTC](https://discuss.elastic.co/t/how-to-index-these-documents/95895 "2017-08-04T14:16:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Red](https://avatars.discourse-cdn.com/v4/letter/r/59ef9b/32.png) [@Red](https://discuss.elastic.co/u/Red)\
**Post date:** [August 4, 2017, 2:16pm UTC](https://discuss.elastic.co/t/how-to-index-these-documents/95895/1 "2017-08-04T14:16:44Z")

</div>

i will index some doc, which are like this:

```
 {
   "location" :{
       "type" : "point",
       "coordinates" : [1, 2]
   },
   "PartA":{
       "Date_20170804":{
           "DevId_1":[
               { "loc": [1.0000001, 2.000001], "ts": 1000},
               { "loc": [1.0000001, 2.000001], "ts": 1001}
           ],    
           "DevId_2":[ 
               { "loc": [1.0000001, 2.000001], "ts": 1000},
               { "loc": [1.0000001, 2.000001], "ts": 1001}
           ]
       }
   }
}

```

- only location should be indexed in geo\_shape index type.  
any other fileds should not be indexed, but the json structure should be remained,
- 
- 

```
   i will find some fileds inside. i think keep the json structure may be fast. 
   if set other filed to not a type. the mapping will not updated. will it unencode json data everytime when i query this doc, or will it find some filed in this json be slow?
   the doc could be very large

```

fileds DevId\_1 DeviId\_xxx is filed has nested document. and could be appended.

- how to make a mapping for this document?

- use dynamic template? i cant make every fileds not being indexed.

- use dynamic:false? how to append new nested doc ? will it be slow when querying?

- all i want is Dev\_XXX filed not index, and store only original data.

---

<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:** [September 1, 2017, 2:16pm UTC](https://discuss.elastic.co/t/how-to-index-these-documents/95895/2 "2017-09-01T14:16:45Z")

</div>

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