OpenSearch/docs/reference/query-dsl/queries
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
..
bool-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
boosting-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
common-terms-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
constant-score-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
dis-max-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
filtered-query.asciidoc Docs: Added Tiki Wiki integration 2014-07-23 11:00:46 +02:00
flt-field-query.asciidoc Rename edit_distance/min_similarity to fuzziness 2014-01-09 15:14:51 +01:00
flt-query.asciidoc Rename edit_distance/min_similarity to fuzziness 2014-01-09 15:14:51 +01:00
function-score-query.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
fuzzy-query.asciidoc [DOCS] Fixed the fuzzy query docs with correct default value max_expansion option 2014-06-05 19:52:12 +02:00
geo-shape-query.asciidoc [DOCS] Removed outdated new/deprecated version notices 2013-09-03 21:28:31 +02:00
has-child-query.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
has-parent-query.asciidoc Docs: Updated the explanation about memory usage with parent/child 2014-06-21 16:32:29 +02:00
ids-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
indices-query.asciidoc Removed 0.90.* deprecation and addition notifications 2014-02-07 20:52:49 +01:00
match-all-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
match-query.asciidoc Fixed a typo 2014-08-14 16:27:30 +02:00
minimum-should-match.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
mlt-field-query.asciidoc MLT Query: use minimum should match more extensive syntax 2014-09-29 11:14:56 +02:00
mlt-query.asciidoc Term Vectors/MLT Query: support for different analyzers than default at field 2014-10-03 16:40:17 +02:00
multi-match-query.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
multi-term-rewrite.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
nested-query.asciidoc Update nested-query.asciidoc 2014-07-26 22:32:28 +02:00
prefix-query.asciidoc Docs: Update prefix-query.asciidoc 2014-09-07 11:32:05 +02:00
query-string-query.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
query-string-syntax.asciidoc Docs: Update query-string-syntax.asciidoc 2014-07-23 16:32:32 +02:00
range-query.asciidoc Search: add `format` support for date range filter and queries 2014-10-06 15:59:18 +02:00
regexp-query.asciidoc Docs: Add clarifying text about regexp and terms 2014-07-03 11:39:57 +02:00
regexp-syntax.asciidoc Docs: Update regexp-syntax.asciidoc 2014-09-07 11:42:33 +02:00
simple-query-string-query.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
span-first-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
span-multi-term-query.asciidoc RegexpQueryBuilder now implements MultiTermQueryBuilder 2013-10-31 09:12:57 +01:00
span-near-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
span-not-query.asciidoc Docs: Update span-not-query.asciidoc 2014-09-07 11:28:19 +02:00
span-or-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
span-term-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
template-query.asciidoc Docs: Removed all the added/deprecated tags from 1.x 2014-09-26 21:04:42 +02:00
term-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
terms-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00
top-children-query.asciidoc Facets: Removal from master. 2014-08-21 10:34:39 +02:00
wildcard-query.asciidoc Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00