# Term is not working after some time

**URL:** <https://discuss.elastic.co/t/term-is-not-working-after-some-time/102664>\
**Category:** Elasticsearch\
**Created:** [October 4, 2017, 8:33am UTC](https://discuss.elastic.co/t/term-is-not-working-after-some-time/102664 "2017-10-04T08:33:27Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![nkk](https://avatars.discourse-cdn.com/v4/letter/n/58956e/32.png) [@nkk](https://discuss.elastic.co/u/nkk)\
**Post date:** [October 4, 2017, 8:33am UTC](https://discuss.elastic.co/t/term-is-not-working-after-some-time/102664/1 "2017-10-04T08:33:27Z")

</div>

Hello,

i am using elasticsearch 1.7, i have a mapping  
"testClass": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }}  
after posting mapping, i could run both match and term queries.  
but after 3 to 4 days term start fail, but match works.

queries:

{ "query" : { "match" :{"testClass" : "abcd" }} }

{ "query" : { "term" :{"testClass" : "abcd" }} }

i did not understand this behavior , please help me to under stand, my expectation always term should work.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 4, 2017, 8:34am UTC](https://discuss.elastic.co/t/term-is-not-working-after-some-time/102664/2 "2017-10-04T08:34:37Z")

</div>

What did you index?

Reproduction script?

And you really need to update your version!

---

<div class="post-metadata">

**Author:** ![nkk](https://avatars.discourse-cdn.com/v4/letter/n/58956e/32.png) [@nkk](https://discuss.elastic.co/u/nkk)\
**Post date:** [October 4, 2017, 8:38am UTC](https://discuss.elastic.co/t/term-is-not-working-after-some-time/102664/3 "2017-10-04T08:38:51Z")

</div>

i have a 15 columns along with testclass, will get data from a upstream and same i am posting.  
yes, we have a target in pipe line to upgrade , but for now , we have to go with old version.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 4, 2017, 8:52am UTC](https://discuss.elastic.co/t/term-is-not-working-after-some-time/102664/4 "2017-10-04T08:52:28Z")

</div>

Could you provide a full recreation script as described in

> [@About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21):
>
> The heart of the free and open Elastic Stack Elasticsearch is a distributed, RESTful search and analytics engine capable of addressing a growing number of use cases. As the heart of the Elastic Stack, it centrally stores your data for lightning fast search, fine‑tuned relevancy, and powerful analytics that scale with ease. warning PLEASE READ THIS SECTION IF IT'S YOUR FIRST POST Some useful links: [elasticsearch reference guide](http://www.elastic.co/guide/en/elasticsearch/reference/current/index.html)[elasticsearch user guide](http://www.elastic.co/guide/en/elasticsearch/guide/current/index.html)[elasticsearch plugins](https://www.elastic.co/guide/en/elasticsearch/plugins/current/index.html)[elasticsearch cl…](https://www.elastic.co/guide/en/elasticsearch/client/index.html)

It will help to better understand what you are doing.  
Please, try to keep the example as simple as possible.

---

<div class="post-metadata">

**Author:** ![nkk](https://avatars.discourse-cdn.com/v4/letter/n/58956e/32.png) [@nkk](https://discuss.elastic.co/u/nkk)\
**Post date:** [October 4, 2017, 11:09am UTC](https://discuss.elastic.co/t/term-is-not-working-after-some-time/102664/5 "2017-10-04T11:09:28Z")

</div>

please find the following mapping

{  
"settings": {  
"index": { "number\_of\_shards": 5, "number\_of\_replicas": 2 },  
"index.mapper.dynamic": true,  
"index.cache.query.enable": true,  
"index.store.type": "niofs"  
},  
"vals": {  
"properties": {  
"mid": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"pub": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"sName": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"source": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"value": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"valueType": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"whId": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"lastUpdated": { "type": "date" , "format": "yyyy-MM-dd"},  
"eId": { "type": "long" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"cList": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"eCode": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"eLabel": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"lblcode": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"peCode": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"region": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"metId": { "type": "long" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"abbreviation": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"testClass": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"definition": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"med":{ "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"metLabel": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"pcity": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"unit": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"unitType": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"uf": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"year": { "type": "long" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"endDate": { "type": "date" , "format": "yyyy-MM-dd"},  
"startDate": { "type": "date" , "format": "yyyy-MM-dd"},  
"pd": { "type": "string", "index": "not\_analyzed", "norms": { "enabled": false }},  
"pId": { "type": "string", "index": "not\_analyzed", "norms": { "enabled": false }},  
"pf" : { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 4, 2017, 12:00pm UTC](https://discuss.elastic.co/t/term-is-not-working-after-some-time/102664/6 "2017-10-04T12:00:00Z")

</div>

How can I play it?

---

<div class="post-metadata">

**Author:** ![nkk](https://avatars.discourse-cdn.com/v4/letter/n/58956e/32.png) [@nkk](https://discuss.elastic.co/u/nkk)\
**Post date:** [October 5, 2017, 2:45pm UTC](https://discuss.elastic.co/t/term-is-not-working-after-some-time/102664/7 "2017-10-05T14:45:30Z")

</div>

Hello,

i have one more similar mapping which has less col and also giving some sample data

please find the following mapping and sample data

{  
"settings": {  
"index": { "number\_of\_shards": 5, "number\_of\_replicas": 2 },  
"index.mapper.dynamic": true,  
"index.cache.query.enable": true,  
"index.store.type": "niofs"  
},  
"testC": {  
"properties": {  
"eId": { "type": "long" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"cList": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"eCode": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"eLabel": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"market": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"peode": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"region": { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }},  
"dLabel" : { "type": "string" , "index": "not\_analyzed", "norms": { "enabled": false }}  
}  
}  
}

Sample data :

{  
"eId": 4,  
"eLabel": "acd",  
"peCode": "A1",  
"eCode": "XRR",  
"region": "R1",  
"cList": "E1 Area",  
"market": "F1",  
"dLabel": "Ctry#E|B#30y"

}

{  
"eId": 9,  
"eLabel": "cd2",  
"peCode": "C4",  
"eCode": "ZRR",  
"region": "R1",  
"cList": "E1 Area",  
"market": "D1",  
"dLabel": "Ctry#D|N#31y"  
}

---

<div class="post-metadata">

**Author:** ![nkk](https://avatars.discourse-cdn.com/v4/letter/n/58956e/32.png) [@nkk](https://discuss.elastic.co/u/nkk)\
**Post date:** [October 6, 2017, 7:57am UTC](https://discuss.elastic.co/t/term-is-not-working-after-some-time/102664/8 "2017-10-06T07:57:15Z")

</div>

can some help me on this, not able understand term and match working at same time and after some time only match working , term failing .

---

<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 3, 2017, 7:57am UTC](https://discuss.elastic.co/t/term-is-not-working-after-some-time/102664/9 "2017-11-03T07:57:36Z")

</div>

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