# Term query retrieved not matched document

**URL:** <https://discuss.elastic.co/t/term-query-retrieved-not-matched-document/135469>\
**Category:** Elasticsearch\
**Created:** [June 12, 2018, 7:02am UTC](https://discuss.elastic.co/t/term-query-retrieved-not-matched-document/135469 "2018-06-12T07:02:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![z3ronp](https://avatars.discourse-cdn.com/v4/letter/z/97f17d/32.png) [@z3ronp](https://discuss.elastic.co/u/z3ronp)\
**Post date:** [June 12, 2018, 7:02am UTC](https://discuss.elastic.co/t/term-query-retrieved-not-matched-document/135469/1 "2018-06-12T07:02:12Z")

</div>

with following query dsl :  
`{ "query": { "bool": { "must": [{ "term": { "content_id": "227524474579977216" } }, { "term": { "problem_type": 22 } }] } } }`

but retrieved document ' s problem\_type is 85, not match the query condition  
`{ "_index": "articles", "_type": "novel", "_id": "190143452187855629", "_version": 8, "_score": 16.928886, "_source": { "content_id": "227524474579977216", "audit_type": 0, "content_type": 1, "creator": "sys", "create_time": "2018-06-09 16:42:13", "audit_status": 1, "audit_time": "2018-06-11 10:28:31", "category": "生活", "source_name": "枪声粉碎生活宁静", "publish_time": "2018-06-09 16:42:03", "problem_type": [85], } }`  
used index api to update same \_id document problem\_type field .

if change to use update api to update same \_id document problem\_type field, will not occur not matched result

---

<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:** [July 10, 2018, 7:02am UTC](https://discuss.elastic.co/t/term-query-retrieved-not-matched-document/135469/2 "2018-07-10T07:02:16Z")

</div>

Closed on July 10, 2018, 7:02am UTC

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