# ES 1.4.0 / Mapping is changed after first index

**URL:** <https://discuss.elastic.co/t/es-1-4-0-mapping-is-changed-after-first-index/21881>\
**Category:** Elasticsearch\
**Created:** [January 28, 2015, 4:36pm UTC](https://discuss.elastic.co/t/es-1-4-0-mapping-is-changed-after-first-index/21881 "2015-01-28T16:36:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aleks](https://avatars.discourse-cdn.com/v4/letter/a/8edcca/32.png) [@Aleks](https://discuss.elastic.co/u/Aleks)\
**Post date:** [January 28, 2015, 4:36pm UTC](https://discuss.elastic.co/t/es-1-4-0-mapping-is-changed-after-first-index/21881/1 "2015-01-28T16:36:13Z")

</div>

Hello,

I have some strange behavior here.

I have an Index called webanalytics.  
There is one type called MesuresVisitoratHeure. Here is the mapping :

{  
"webanalytics": {  
"mappings": {  
"MesuresVisitoratHeure": {  
"\_ttl": {  
"enabled": true,  
"default": 31536000000  
},  
"properties": {  
"OperationCode": {  
"type": "string"  
},  
"Source": {  
"type": "string"  
},  
"application": {  
"type": "string"  
},  
"country": {  
"type": "string"  
},  
"nbPagesVues": {  
"type": "long"  
},  
"nbVisites": {  
"type": "long"  
},  
"nbVisitesARebond": {  
"type": "long"  
},  
"nbVisiteurs": {  
"type": "long"  
},  
"page": {  
"type": "string"  
},  
"support": {  
"type": "string"  
},  
"tempsPassePages": {  
"type": "float"  
},  
"tempsPasseVisites": {  
"type": "float"  
},  
"timeStamp": {  
"type": "date",  
"format": "dateOptionalTime"  
},  
"typePage": {  
"type": "string",  
"index": "not\_analyzed"  
}  
}  
}  
}  
}  
}

This index/type already contains documents.

I now want to add another type in the same index  
called MesuresVisitoratJours with the same mapping expect that this one :

- have 2 mores properties
- does not need ttl
- I also wanted to make more properties not\_analysed

After creating the mapping and indexing some documents, I get errors about  
mismatch types when I make some search/aggregate query.

So, I tried to create mapping based on the first old type. Here is what I  
put to create the mapping :

{  
"MesuresVisitoratJours": {  
"\_ttl": {  
"enabled": true,  
"default": 31536000000  
},  
"properties": {  
"OperationCode": {  
"type": "string"  
},  
"Source": {  
"type": "string"  
},  
"application": {  
"type": "string"  
},  
"country": {  
"type": "string"  
},  
"nbPagesVues": {  
"type": "long"  
},  
"nbVisites": {  
"type": "long"  
},  
"nbVisitesARebond": {  
"type": "long"  
},  
"nbVisiteurs": {  
"type": "long"  
},  
"page": {  
"type": "string"  
},  
"support": {  
"type": "string"  
},  
"tempsPassePages": {  
"type": "float"  
},  
"tempsPasseVisites": {  
"type": "float"  
},  
"timeStamp": {  
"type": "date",  
"format": "dateOptionalTime"  
},  
"typePage": {  
"type": "string",  
"index": "not\_analyzed"  
},  
"nbClicBandeauVentesOuvertes": {  
"type": "long"  
},  
"nbChargements": {  
"type": "long"  
}  
}  
}  
}

Here, if I get the \_mapping, everything is ok. They are identical.  
Then I reindex documents I want. But I keep getting errors on  
search/aggration.  
And, when I get the \_mapping, here is what I have now :

{  
"webanalytics": {  
"mappings": {  
"MesuresVisitoratJours": {  
"properties": {  
"Source": {  
"type": "string"  
},  
"application": {  
"type": "string"  
},  
"country": {  
"type": "string"  
},  
"nbChargements": {  
"type": "long"  
},  
"nbClicBandeauVentesOuvertes": {  
"type": "long"  
},  
"nbPagesVues": {  
"type": "long"  
},  
"nbVisites": {  
"type": "long"  
},  
"nbVisitesARebond": {  
"type": "long"  
},  
"nbVisiteurs": {  
"type": "long"  
},  
"page": {  
"type": "string"  
},  
"support": {  
"type": "string"  
},  
"tempsPassePages": {  
"type": "_double_"  
},  
"tempsPasseVisites": {  
"type": "_double_"  
},  
"timeStamp": {  
"type": "date",  
"format": "dateOptionalTime"  
},  
"typePage": {  
"type": "string"  
}  
}  
}  
}  
}  
}

Notice that TTL disapeared, float became double and "not\_analysed" disapear  
too.

I really don't understand what is happening.  
Can you please provide me some helps ?

Thank you.  
Alek

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/70dc07f3-ea45-4589-a319-148b54224c1e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/70dc07f3-ea45-4589-a319-148b54224c1e%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Aleks](https://avatars.discourse-cdn.com/v4/letter/a/8edcca/32.png) [@Aleks](https://discuss.elastic.co/u/Aleks)\
**Post date:** [February 3, 2015, 3:45pm UTC](https://discuss.elastic.co/t/es-1-4-0-mapping-is-changed-after-first-index/21881/2 "2015-02-03T15:45:33Z")

</div>

Hello again,

As no reply was made, I decided to reindex all datas last friday.  
Everything was fine until now. _A float type became long I don't know how_.

Is there someone that can help me investigate ?

Thank you.  
Alek

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/59d58245-880d-4239-87ce-326133167ca3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/59d58245-880d-4239-87ce-326133167ca3%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 12:35am UTC](https://discuss.elastic.co/t/es-1-4-0-mapping-is-changed-after-first-index/21881/3 "2017-07-06T00:35:10Z")

</div>

Closed on July 6, 2017, 12:35am UTC


