OpenSearch/docs/reference
David Pilato 6ae6a078de Search: add `format` support for date range filter and queries
When the date format is defined in mapping, you can not use another format when querying using range date query or filter.

For example, this won't work:

```
DELETE /test

PUT /test/t/1
{
  "date": "2014-01-01"
}

GET /test/_search
{
  "query": {
    "filtered": {
      "filter": {
        "range": {
          "date": {
            "from": "01/01/2014"
          }
        }
      }
    }
  }
}
```

It causes:

```
Caused by: org.elasticsearch.ElasticsearchParseException: failed to parse date field [01/01/2014], tried both date format [dateOptionalTime], and timestamp number
```

It could be nice if we can support at query time another date format just like we support `analyzer` at search time on String fields.

Something like:

```
GET /test/_search
{
  "query": {
    "filtered": {
      "filter": {
        "range": {
          "date": {
            "from": "01/01/2014",
            "format": "dd/MM/yyyy"
          }
        }
      }
    }
  }
}
```

Same for queries:

```
GET /test/_search
{
  "query": {
    "range": {
      "date": {
        "from": "01/01/2014",
        "format": "dd/MM/yyyy"
      }
    }
  }
}
```

Closes #7189.
2014-10-06 15:59:18 +02:00
..
analysis Remove comma in JSON 2014-09-28 11:08:09 +02:00
cat Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
cluster Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
docs Term Vectors/MLT Query: support for different analyzers than default at field 2014-10-03 16:40:17 +02:00
images Docs: fix formula typo in documentation of the gauss decay in function_score 2014-09-01 09:46:13 +02:00
index-modules Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
indices Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
mapping Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
migration Docs: Document the most important changes to zen discovery. 2014-09-30 13:05:45 +02:00
modules Docs: Document the most important changes to zen discovery. 2014-09-30 13:05:45 +02:00
query-dsl Search: add `format` support for date range filter and queries 2014-10-06 15:59:18 +02:00
search Aggregations: makes script params consistent with other APIs in scripted_metric 2014-10-06 09:07:25 +01:00
setup Update upgrade.asciidoc 2014-09-24 21:09:13 +02:00
testing Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
analysis.asciidoc Add more anchor links to documentation 2013-09-30 13:13:16 -06:00
api-conventions.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
cat.asciidoc [DOCS] reordered cat apis menu 2014-06-03 11:06:35 +02:00
cluster.asciidoc [DOCS] Fix HTTP endpoints after stats API changes 2014-01-09 11:30:28 +01:00
docs.asciidoc Bulk UDP: Removal. 2014-09-11 09:52:09 +02:00
getting-started.asciidoc Fix Idaho spelling 2014-09-28 11:09:48 +02:00
glossary.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
index-modules.asciidoc [DOCS] Remove the section about codecs. 2014-08-07 11:24:44 +02:00
index.asciidoc Core: Added the `index.query.parse.allow_unmapped_fields` setting to fail queries if they refer to unmapped fields. 2014-09-09 15:00:47 +02:00
indices.asciidoc Indices API: Added GET Index API 2014-09-11 11:19:21 +01:00
mapping.asciidoc Facets: Removal from master. 2014-08-21 10:34:39 +02:00
modules.asciidoc [DOCS] Fixed link to tribe.asciidoc 2014-01-13 22:01:12 +01:00
query-dsl.asciidoc Facets: Removal from master. 2014-08-21 10:34:39 +02:00
search.asciidoc Search Exists API: Checks if any matching documents exist for a given query 2014-07-31 15:42:30 -04:00
setup.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
testing.asciidoc [DOCS] Test framework documentation 2013-12-02 18:01:45 +01:00