Skip to content

filtering on _timestamp field (with custom format) not working #5328

@karol-gwaj

Description

@karol-gwaj

run the example below:

DELETE test

POST test

PUT test/test/_mapping
{
    "test" : 
    {
        "_timestamp" : { "enabled" : true, "store" : true, "format": "yyyyMMddHHmmssSSS"}
    }
}

POST test/test/1?timestamp=20140301101010123
{
    "id" : 1
}

POST test/_search
{
    "fields": [
       "_timestamp"
    ], 
    "query": {
        "range": {
           "_timestamp": {
              "from": 20140301101010000,    
              "to": 20140301101010999
           }
        }
    }
}

i wll expect that last query will return created document (as the timestamp falls into specified range)
also after inserting, timestamp on document is not this same as the one specified in the request (it is in fact 20140301101010124 when it should be 20140301101010123)

context:

  • es: 1.0.0
  • jvm: 1.7.0_51
  • hosted in EC2

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions