# Term does not return the exact results

**URL:** <https://discuss.elastic.co/t/term-does-not-return-the-exact-results/285909>\
**Category:** Elasticsearch\
**Created:** [October 5, 2021, 11:11am UTC](https://discuss.elastic.co/t/term-does-not-return-the-exact-results/285909 "2021-10-05T11:11:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tung\_Doan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tung_doan/32/80037_2.png) [@Tung\_Doan](https://discuss.elastic.co/u/Tung_Doan)\
**Post date:** [October 5, 2021, 11:11am UTC](https://discuss.elastic.co/t/term-does-not-return-the-exact-results/285909/1 "2021-10-05T11:11:04Z")

</div>

I have the following nested schema: **dataCollectorInfo.files.indexedData.objects.measures.properties.unit**

```auto
"_source": {
	"dataCollectorInfo": {
		"files": {
			"indexedData": {
				"objects": {
					"measures": {
						"properties": {
							"unit": ...
						}
					}
				}
			}
		}
	}
}

```

i want to search for EXACT term with unit value = "Pa s". I tried the term query as bellow:

```auto
{
	"query": {
		"nested": {
			"path": "dataCollectorInfo.files.indexedData.objects.measures.properties",
			"query": {
				"bool": {
					"must": [
						{
							"term": {
								"dataCollectorInfo.files.indexedData.objects.measures.properties.unit.keyword": {
									"value": "Pa s"
								}
							}
						}
					]
				}
			}
		}
	}
}

```

For some reasons, even the results with unit value = "mPa s" are also returned.

Can some one tell me, what i have been missing ?

---

<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:** [November 2, 2021, 11:11am UTC](https://discuss.elastic.co/t/term-does-not-return-the-exact-results/285909/2 "2021-11-02T11:11:41Z")

</div>

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