Between/Range query issue

document in Elasticsearch index

{
                "_index": "elasticsearchlocal",
                "_type": "deliveryprojection",
                "_id": "11102",
                "_score": null,
                "_source": {
                    "zipCode": "60015",
                    "prioritySeq": 1,
                    "siteName": "MW",
                    "residentialFlag": true,                 
                    "wareHouseKeyId": "Primary",                      
                    "warehouseCutOffs": [                        
                        {
                            "cutOffFrom": 4.000277777777778,
                            "cutOffTo": 5,
                            "additionalTransitDay": 0,
                            "nextDayShipping": false
                        },
                        {
                            "cutOffFrom": 5.000277777777778,
                            "cutOffTo": 6,
                            "additionalTransitDay": 0,
                            "nextDayShipping": false
                        },
                        {
                            "cutOffFrom": 6.000277777777778,
                            "cutOffTo": 7,
                            "additionalTransitDay": 0,
                            "nextDayShipping": false
                        },
                        {
                            "cutOffFrom": 7.000277777777778,
                            "cutOffTo": 8,
                            "additionalTransitDay": 0,
                            "nextDayShipping": false
                        },
                        {
                            "cutOffFrom": 8.000277777777777,
                            "cutOffTo": 9,
                            "additionalTransitDay": 0,
                            "nextDayShipping": false
                        },
                        {
                            "cutOffFrom": 9.000277777777777,
                            "cutOffTo": 10,
                            "additionalTransitDay": 0,
                            "nextDayShipping": false
                        },
                        {
                            "cutOffFrom": 10.000277777777777,
                            "cutOffTo": 11,
                            "additionalTransitDay": 0,
                            "nextDayShipping": false
                        },
                        {
                            "cutOffFrom": 11.000277777777777,
                            "cutOffTo": 12,
                            "additionalTransitDay": 0,
                            "nextDayShipping": false
                        },
                        {
                            "cutOffFrom": 12.000277777777777,
                            "cutOffTo": 13,
                            "additionalTransitDay": 0,
                            "nextDayShipping": false
                        },
                        {
                            "cutOffFrom": 13.000277777777777,
                            "cutOffTo": 14,
                            "additionalTransitDay": 0,
                            "nextDayShipping": false
                        },
                        {
                            "cutOffFrom": 14.000277777777777,
                            "cutOffTo": 15,
                            "additionalTransitDay": 0,
                            "nextDayShipping": false
                        },
                        {
                            "cutOffFrom": 15.000277777777777,
                            "cutOffTo": 16,
                            "additionalTransitDay": 0,
                            "nextDayShipping": false
                        },
                        {
                            "cutOffFrom": 16.00027777777778,
                            "cutOffTo": 17.25,
                            "additionalTransitDay": 0,
                            "nextDayShipping": false
                        },
                        {
                            "cutOffFrom": 20.25027777777778,
                            "cutOffTo": 21,
                            "additionalTransitDay": 1,
                            "nextDayShipping": true
                        },
                        {
                            "cutOffFrom": 21.000277777777775,
                            "cutOffTo": 22.25,
                            "additionalTransitDay": 1,
                            "nextDayShipping": true
                        },
                        {
                            "cutOffFrom": 22.250277777777775,
                            "cutOffTo": 23,
                            "additionalTransitDay": 1,
                            "nextDayShipping": false
                        },
                        {
                            "cutOffFrom": 23.000277777777775,
                            "cutOffTo": 0,
                            "additionalTransitDay": 1,
                            "nextDayShipping": false
                        }
                    ],
                    "id": 11102,
                    "hasMoreRecord": false,
                    "contentTypeId": 0
                },
                "sort": [
                    1
                ]
            }

When I execute below range query, above record is being returned from Elasticsearch. Above document doesn't have warehouseCutOffs.cutOffFrom and warehouseCutOffs.cutOffTo in between 18.777590778666666 value.
I am not sure why below query is returning this record. How can I exclude above document when this query is executed ?
Any help is greatly appreciated.

{
    	"size": 3,
    	"sort": [{
    		"prioritySeq": {
    			"order": "asc"
    		}
    	}],
    	"query": {
    		"bool": {
    			"must": [{
    				"term": {
    					"zipCode": {
    						"value": "60015"
    					}
    				}
    			}, {
    				"term": {
    					"residentialFlag": {
    						"value": true
    					}
    				}
    			}, {
    				"range": {
    					"warehouseCutOffs.cutOffFrom": {
    						"lt": 18.777590778666666
    					}
    				}
    			}, {
    				"range": {
    					"warehouseCutOffs.cutOffTo": {
    						"gt": 18.777591334222222
    					}
    				}
    			}]
    		}
    	}
    }

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.