Thanks Alex for your help. I've extracted just that one field and started with a brand new index. I'm still seeing the date search not working properly.
Here is index creation with mapping:
PUT date_test
{
"mappings": {
"properties": {
"ConnectionStatusLastChangeTime": {
"type": "date",
"format": "strict_date_time"
}
}
}
}
I've loaded it up with my date dataset. You can download a copy here: dateData.json
Here is my search query:
GET date_test/_search
{
"query": {
"range": {
"ConnectionStatusLastChangeTime": {
"gte": "now-7d"
}
}
}
}
Here is the search output (notice the two dates that are much farther back than 7 days - 2 out of 10 results ):
{
"took" : 1,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 8145,
"relation" : "eq"
},
"max_score" : 1.0,
"hits" : [
{
"_index" : "date_test",
"_type" : "_doc",
"_id" : "lmOyhGEBQgB2YO0Vai_8",
"_score" : 1.0,
"_source" : {
"ConnectionStatusLastChangeTime" : "2019-08-03T17:04:11.298Z"
}
},
{
"_index" : "date_test",
"_type" : "_doc",
"_id" : "l2OyhGEBQgB2YO0Vay8V",
"_score" : 1.0,
"_source" : {
"ConnectionStatusLastChangeTime" : "2019-08-02T14:29:54.42Z"
}
},
{
"_index" : "date_test",
"_type" : "_doc",
"_id" : "mGOyhGEBQgB2YO0Vay8V",
"_score" : 1.0,
"_source" : {
"ConnectionStatusLastChangeTime" : "2019-08-02T02:31:46.726Z"
}
},
{
"_index" : "date_test",
"_type" : "_doc",
"_id" : "mWOyhGEBQgB2YO0Vay8V",
"_score" : 1.0,
"_source" : {
"ConnectionStatusLastChangeTime" : "2019-02-11T17:49:12.617Z"
}
},
{
"_index" : "date_test",
"_type" : "_doc",
"_id" : "mmOyhGEBQgB2YO0Vay8V",
"_score" : 1.0,
"_source" : {
"ConnectionStatusLastChangeTime" : "2019-08-03T17:03:21.537Z"
}
},
{
"_index" : "date_test",
"_type" : "_doc",
"_id" : "m2OyhGEBQgB2YO0Vay8V",
"_score" : 1.0,
"_source" : {
"ConnectionStatusLastChangeTime" : "2019-08-05T18:08:32.589Z"
}
},
{
"_index" : "date_test",
"_type" : "_doc",
"_id" : "nGOyhGEBQgB2YO0Vay8V",
"_score" : 1.0,
"_source" : {
"ConnectionStatusLastChangeTime" : "2019-08-06T03:46:32.062Z"
}
},
{
"_index" : "date_test",
"_type" : "_doc",
"_id" : "nWOyhGEBQgB2YO0Vay8V",
"_score" : 1.0,
"_source" : {
"ConnectionStatusLastChangeTime" : "2018-08-16T20:21:46.974Z"
}
},
{
"_index" : "date_test",
"_type" : "_doc",
"_id" : "nmOyhGEBQgB2YO0Vay8V",
"_score" : 1.0,
"_source" : {
"ConnectionStatusLastChangeTime" : "2019-08-06T04:49:58.553Z"
}
},
{
"_index" : "date_test",
"_type" : "_doc",
"_id" : "n2OyhGEBQgB2YO0Vay8V",
"_score" : 1.0,
"_source" : {
"ConnectionStatusLastChangeTime" : "2019-08-02T05:22:42.549Z"
}
}
]
}
}
Here is my ES info:
{
"name" : "hx-es-node-1",
"cluster_name" : "REDACTED",
"cluster_uuid" : "REDACTED",
"version" : {
"number" : "7.1.0",
"build_flavor" : "default",
"build_type" : "deb",
"build_hash" : "606a173",
"build_date" : "2019-05-16T00:43:15.323135Z",
"build_snapshot" : false,
"lucene_version" : "8.0.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
Please let me know if this is enough information for you to be able to try to reproduce the issue. Thank you for the assistance!