nest - Date Range Query Elasticsearch -


below query when executed in elasticsearch version 1.x

was considering documents created after 6/15/2016 documents have time beyond 12 date 6/15/2016.it considering documents till 6/15/2016 23:59:59.999 .

but new version of es 2.x range query has stopped considering documents have time beyond 12 date 6/15/2016. considering documents till 6/14/2016 23:59:59.999.

what changed here?

{  "from": 0,  "size": 10,  "sort": [    {      "pronumber.sort": {        "order": "desc"      }    }  ],  "query": {    "bool": {      "must": [        {          "match": {            "bolnumber": {              "query": "7861254",              "analyzer": "gtz_search_analyzer",              "operator": "and"            }          }        },        {          "range": {            "createddate": {              "gte": "1753-01-01",              "lte": "2016-06-15"            }          }        }      ]    }  } } 

in elasticsearch 2.x query in op upper-limit 6/15/2016 00:00:00.000 , not 6/14/2016 23.59.59.999.
documentation follows need explictly specify in query round-up day shown in example below

example:

{  "from": 0,  "size": 10,  "sort": [    {      "pronumber.sort": {        "order": "desc"      }    }  ],  "query": {    "bool": {      "must": [        {          "match": {            "bolnumber": {              "query": "7861254",              "analyzer": "gtz_search_analyzer",              "operator": "and"            }          }        },        {          "range": {            "createddate": {              "gte": "1753-01-01",              "lte": "2016-06-15||/d"            }          }        }      ]    }  } } 

Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -