# Treatment of low/high/missing terms in Common Terms Query

**URL:** <https://discuss.elastic.co/t/treatment-of-low-high-missing-terms-in-common-terms-query/517>\
**Category:** Elasticsearch\
**Created:** [May 11, 2015, 5:58pm UTC](https://discuss.elastic.co/t/treatment-of-low-high-missing-terms-in-common-terms-query/517 "2015-05-11T17:58:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![loren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/loren/32/44942_2.png) [@loren](https://discuss.elastic.co/u/loren)\
**Post date:** [May 11, 2015, 5:58pm UTC](https://discuss.elastic.co/t/treatment-of-low-high-missing-terms-in-common-terms-query/517/1 "2015-05-11T17:58:55Z")

</div>

From the [Common Terms Query docs](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/query-dsl-common-terms-query.html): The common terms query divides the query terms into two groups: more important (ie low frequency terms) and less important (ie high frequency terms which would previously have been stopwords).

But what does it do with terms that do not exist in the corpus at all?

For example, if I have a movie corpus and I query _The Matrix qwerty_, I'd get _the_ treated as high frequency, _matrix_ treated as low frequency, but what about _qwerty_?

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [May 11, 2015, 6:20pm UTC](https://discuss.elastic.co/t/treatment-of-low-high-missing-terms-in-common-terms-query/517/2 "2015-05-11T18:20:59Z")

</div>

Terms that don't exist are considered low frequency:  
[http://grepcode.com/file/repo1.maven.org/maven2/org.apache.lucene/lucene-queries/4.5.0/org/apache/lucene/queries/CommonTermsQuery.java#188](http://grepcode.com/file/repo1.maven.org/maven2/org.apache.lucene/lucene-queries/4.5.0/org/apache/lucene/queries/CommonTermsQuery.java#188)

---

<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 6, 2017, 12:14am UTC](https://discuss.elastic.co/t/treatment-of-low-high-missing-terms-in-common-terms-query/517/3 "2017-07-06T00:14:36Z")

</div>


