# Link DATE field to another one

**URL:** <https://discuss.elastic.co/t/link-date-field-to-another-one/52221>\
**Category:** Elasticsearch\
**Created:** [June 8, 2016, 2:05pm UTC](https://discuss.elastic.co/t/link-date-field-to-another-one/52221 "2016-06-08T14:05:22Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![TonyIT](https://avatars.discourse-cdn.com/v4/letter/t/a587f6/32.png) [@TonyIT](https://discuss.elastic.co/u/TonyIT)\
**Post date:** [June 8, 2016, 2:05pm UTC](https://discuss.elastic.co/t/link-date-field-to-another-one/52221/1 "2016-06-08T14:05:22Z")

</div>

Hello!

I've a index that contains document with a specific (unchangeable) mapping, and another index that use a data field with name "created\_at" to organize and view data by date.  
I have created an alias for the second index that point to the first one, but the difference between the name of two data fields of the indices does not allow to sort the data of the first one.

There is a way to specify (to the second index) that data field have a different name than "created\_at", without modify the mapping?

Thanks.

T.

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [June 8, 2016, 6:06pm UTC](https://discuss.elastic.co/t/link-date-field-to-another-one/52221/2 "2016-06-08T18:06:51Z")

</div>

> [@TonyIT](#):
>
> I have created an alias for the second index that point to the first one

Not really sure what you mean by this. Could you describe your problem a bit more clearly?

---

<div class="post-metadata">

**Author:** ![TonyIT](https://avatars.discourse-cdn.com/v4/letter/t/a587f6/32.png) [@TonyIT](https://discuss.elastic.co/u/TonyIT)\
**Post date:** [June 8, 2016, 9:59pm UTC](https://discuss.elastic.co/t/link-date-field-to-another-one/52221/3 "2016-06-08T21:59:05Z")

</div>

Thanks for your reply, i Will try to detail my problem.  
The indices have similar (but not the same) mapping, the first one is used to store all document, and the second is used by an analizing tool. To avoid duplicated data on indices , I created an alias with the same name on both indexes , so that the second index has visibility of the data contained in the first.  
Now I can see data from my analizing tool, but i'm unable to organize it by date Field, because kibana use a Field named "created\_at", while my data index use a field with another name. Well, i need to "link" this fields.

Thanks!

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [June 8, 2016, 11:47pm UTC](https://discuss.elastic.co/t/link-date-field-to-another-one/52221/4 "2016-06-08T23:47:46Z")

</div>

Do you have control over at least one of the indices? Can you change its mapping and reindex data?

---

<div class="post-metadata">

**Author:** ![TonyIT](https://avatars.discourse-cdn.com/v4/letter/t/a587f6/32.png) [@TonyIT](https://discuss.elastic.co/u/TonyIT)\
**Post date:** [June 9, 2016, 6:54am UTC](https://discuss.elastic.co/t/link-date-field-to-another-one/52221/5 "2016-06-09T06:54:48Z")

</div>

Yes, I have control of both indexes, but I can not change the mapping of what stores documents. Instead, I can update the second one, but i need to mantain the "created\_at" field.

Thanks.

EDIT: the index used by the analytical tool not contains any data, then a reindex operation is unuseful.

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [June 9, 2016, 1:42pm UTC](https://discuss.elastic.co/t/link-date-field-to-another-one/52221/6 "2016-06-09T13:42:45Z")

</div>

Which analytical tool are we talking about? If it is Kibana, you can choose another field there, it doesn't have to be called `created_at`. I don't understand the purpose of having the second empty index. Could you explain it?

---

<div class="post-metadata">

**Author:** ![TonyIT](https://avatars.discourse-cdn.com/v4/letter/t/a587f6/32.png) [@TonyIT](https://discuss.elastic.co/u/TonyIT)\
**Post date:** [June 10, 2016, 7:08am UTC](https://discuss.elastic.co/t/link-date-field-to-another-one/52221/7 "2016-06-10T07:08:18Z")

</div>

Yes, sorry! You are right! simple solution!  
Thanks!

---

<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 5, 2017, 10:44pm UTC](https://discuss.elastic.co/t/link-date-field-to-another-one/52221/8 "2017-07-05T22:44:51Z")

</div>


