# Something wrong with type float search

**URL:** <https://discuss.elastic.co/t/something-wrong-with-type-float-search/165103>\
**Category:** Elasticsearch\
**Created:** [January 21, 2019, 5:40pm UTC](https://discuss.elastic.co/t/something-wrong-with-type-float-search/165103 "2019-01-21T17:40:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![drsaison](https://avatars.discourse-cdn.com/v4/letter/d/ee59a6/32.png) [@drsaison](https://discuss.elastic.co/u/drsaison)\
**Post date:** [January 21, 2019, 5:40pm UTC](https://discuss.elastic.co/t/something-wrong-with-type-float-search/165103/1 "2019-01-21T17:40:27Z")

</div>

```
Could someone tell me anything wrong with the following query, which should return one result instead of two? Thanks.
I created two records
{
	"lat": 33.7479148,
	"lon": -84.1234567
} 
and
{
	"lat": 33.7479149,
	"lon": -84.1234567
}

I expected one result but two results were returned. lat and lon both have type float.
    {
    	"from": 0,
    	"size": 200,
    	"query": {
    		"bool": {
    			"must": [ 
    				
    				{
    				"match": {
    					"lat": {
    						"query": 33.7479149
    						
    					}
    				}
    			}, {
    				"match": {
    					"lon": {
    						"query": -84.1234567
    					}
    				}
    			}]
    			
    		}
    	}
    }

{
"took": 1,
"timed_out": false,
"_shards": {
    "total": 5,
    "successful": 5,
    "skipped": 0,
    "failed": 0
},
"hits": {
    "total": 2,
    "max_score": 2,
    "hits": [
        {
            "_index": "tests",
            "_type": "test",
            "_id": "2",
            "_score": 2,
            "_source": {
                "lat": 33.7479149,
                "lon": -84.1234567
            }
        },
        {
            "_index": "tests",
            "_type": "test",
            "_id": "1",
            "_score": 2,
            "_source": {
                "lat": 33.7479148,
                "lon": -84.1234567
            }
        }
    ]
}
}
```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 18, 2019, 5:40pm UTC](https://discuss.elastic.co/t/something-wrong-with-type-float-search/165103/2 "2019-02-18T17:40:31Z")

</div>

Closed on February 18, 2019, 5:40pm UTC

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