1

In elasticsearch, there is a date range query and fuzzy date query, however I don't see a query for querying a specific date.

Do you know if that type of query exists?

1 Answer 1

2

Use the following mapping:

"properties": {
    "myDate": {
        "type": "date",
        "format": "dd-MM-yyyy"
    }
}

The query for searching the exact date would be:

"query": {
    "term": {
        "myDate": {
            "value": "10-10-2010"
        }
    }
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.