# \_default\_ mapping of template is not compatible with index sorting

**URL:** https://discuss.elastic.co/t/default-mapping-of-template-is-not-compatible-with-index-sorting/251735
**Category:** Elasticsearch
**Created:** [October 12, 2020, 8:47am UTC](https://discuss.elastic.co/t/default-mapping-of-template-is-not-compatible-with-index-sorting/251735 "2020-10-12T08:47:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![hackerwin7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hackerwin7/32/43223_2.png) [@hackerwin7](https://discuss.elastic.co/u/hackerwin7)
#### Post date: [October 12, 2020, 8:47am UTC](https://discuss.elastic.co/t/default-mapping-of-template-is-not-compatible-with-index-sorting/251735/1 "2020-10-12T08:47:56Z")

</div>

version: 6.8.0

we create a `_default_` mapping of index template with the index sorting settings.

when we put data to create a new index of this template, then it will throw "unknown index sort field:[${index sort settings field}]"

we find the sources: `MapperService.internalMerge()` will not merge default mappings into `fieldTypes`, then the `IndexSortConfig.buildIndexSort()` would not lookup the field in `fieldTypes`

---

<div class="post-metadata">

### Author: ![hackerwin7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hackerwin7/32/43223_2.png) [@hackerwin7](https://discuss.elastic.co/u/hackerwin7)
#### Post date: [November 9, 2020, 3:11am UTC](https://discuss.elastic.co/t/default-mapping-of-template-is-not-compatible-with-index-sorting/251735/2 "2020-11-09T03:11:31Z")

</div>

Any helpful info for this?

---

<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: [December 7, 2020, 3:11am UTC](https://discuss.elastic.co/t/default-mapping-of-template-is-not-compatible-with-index-sorting/251735/3 "2020-12-07T03:11:42Z")

</div>

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