# Elasticsearch - return records having a field falling in the given range

**URL:** <https://discuss.elastic.co/t/elasticsearch-return-records-having-a-field-falling-in-the-given-range/170676>\
**Category:** Elasticsearch\
**Created:** [March 4, 2019, 6:37am UTC](https://discuss.elastic.co/t/elasticsearch-return-records-having-a-field-falling-in-the-given-range/170676 "2019-03-04T06:37:52Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 5, 2019, 11:37am UTC](https://discuss.elastic.co/t/elasticsearch-return-records-having-a-field-falling-in-the-given-range/170676/11 "2019-03-05T11:37:22Z")

</div>

Here is your mapping:

```auto
{
  "arxivdb": {
    "mappings": {
      "_doc": {
        "properties": {
          "0": {
            "properties": {
              // Skipped for clarity
              "created": {
                "type": "long"
              },
              // Skipped for clarity
            }
          },
          "1": {
            "properties": {
              // Skipped for clarity
              "created": {
                "type": "text",
                "fields": {
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                }
              },
              // Skipped for clarity
            }
          },
          "3": {
            "properties": {
              // Skipped for clarity
              "created": {
                "type": "text",
                "fields": {
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                }
              },
              // Skipped for clarity
            }
          },
          "4": {
            "properties": {
              // Skipped for clarity
              "created": {
                "type": "long"
              },
              // Skipped for clarity
            }
          },
          "5": {
            "properties": {
              // Skipped for clarity
              "created": {
                "type": "text",
                "fields": {
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                }
              },
              // Skipped for clarity
            }
          },
          // Skipped for clarity
          "created": {
            "type": "date",
            "format": "yyyy-MM-dd'T'HH:mm:ss"
          },
          // Skipped for clarity
        }
      }
    }
  }
}

```

It's definitely a mess. Multiple `created` fields, at different levels.

```auto
              "created": {
                "type": "long"
              },

```

```auto
              "created": {
                "type": "text",
                "fields": {
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                }
              },

```

```auto
          "created": {
            "type": "date",
            "format": "yyyy-MM-dd'T'HH:mm:ss"
          },

```

You probably need to start again from scratch.

If you have further questions please provide a full recreation script as described in [About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will help to better understand what you are exactly doing. Please, try to keep the example as simple as possible.

A full reproduction script will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

---

_[View the full topic](https://discuss.elastic.co/t/elasticsearch-return-records-having-a-field-falling-in-the-given-range/170676)._
