# Two Index pattern with different time filter field names

**URL:** <https://discuss.elastic.co/t/two-index-pattern-with-different-time-filter-field-names/257503>\
**Category:** Elasticsearch\
**Created:** [December 3, 2020, 12:18pm UTC](https://discuss.elastic.co/t/two-index-pattern-with-different-time-filter-field-names/257503 "2020-12-03T12:18:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pskhanapur](https://avatars.discourse-cdn.com/v4/letter/p/dfb087/32.png) [@pskhanapur](https://discuss.elastic.co/u/pskhanapur)\
**Post date:** [December 3, 2020, 12:18pm UTC](https://discuss.elastic.co/t/two-index-pattern-with-different-time-filter-field-names/257503/1 "2020-12-03T12:18:17Z")

</div>

I have one index and I want to visualize my data using two different time filters (i.e. two different fields).  
Do I need to create two index patterns? Is it even possible to create two index pattern on same index? I thought I could create second index pattern and choose another filed as time filter, doesn't allow me though.

Details:

```auto
doc
{
  mydata : "abcd"
  timestamp1: 1605905471710
  timestamp2: 1605905471099
}

```

I want to visualize my data based on timestamp1 and timestamp2 separately.

---

<div class="post-metadata">

**Author:** ![ahmed\_charafouddine](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ahmed_charafouddine/32/45129_2.png) [@ahmed\_charafouddine](https://discuss.elastic.co/u/ahmed_charafouddine)\
**Post date:** [December 3, 2020, 12:25pm UTC](https://discuss.elastic.co/t/two-index-pattern-with-different-time-filter-field-names/257503/2 "2020-12-03T12:25:50Z")

</div>

You must already index the two timestamps with the correct mapping = date and then you can create two separate visualize

---

<div class="post-metadata">

**Author:** ![pskhanapur](https://avatars.discourse-cdn.com/v4/letter/p/dfb087/32.png) [@pskhanapur](https://discuss.elastic.co/u/pskhanapur)\
**Post date:** [December 4, 2020, 8:55am UTC](https://discuss.elastic.co/t/two-index-pattern-with-different-time-filter-field-names/257503/3 "2020-12-04T08:55:19Z")

</div>

I did not understand. Can you please elaborate a bit?  
When I create index pattern, I can select only one of the fields (timestamp1 or timestamp2) as time filter. Let's say I select timestamp1 as time-filter.  
Now if I try to create another index pattern (with time filter as timestamp2), it does not allow me to create , it says index pattern already exists with same name.  
Are you saying it is not necessary to create another index pattern?

---

<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:** [January 1, 2021, 8:55am UTC](https://discuss.elastic.co/t/two-index-pattern-with-different-time-filter-field-names/257503/4 "2021-01-01T08:55:29Z")

</div>

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