# Using shingle and stop filters

**URL:** <https://discuss.elastic.co/t/using-shingle-and-stop-filters/236067>\
**Category:** Elasticsearch\
**Created:** [June 7, 2020, 3:46am UTC](https://discuss.elastic.co/t/using-shingle-and-stop-filters/236067 "2020-06-07T03:46:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chari](https://avatars.discourse-cdn.com/v4/letter/c/db5fbb/32.png) [@chari](https://discuss.elastic.co/u/chari)\
**Post date:** [June 7, 2020, 3:46am UTC](https://discuss.elastic.co/t/using-shingle-and-stop-filters/236067/1 "2020-06-07T03:46:55Z")

</div>

I am using shingle and stop filters, trim and filler\_token="".

When i run analyze API on a string : "Word1 Word2 StopWord1 StopWord2 Word3 Word4", I get the following SHINGLES which seem to be correct.  
i) "Word1 Word2"  
ii) "Word2"  
iii) "Word3"  
iv) "Word3 Word4"

Is there any way to suppress shingles ii) and iii).

---

<div class="post-metadata">

**Author:** ![chari](https://avatars.discourse-cdn.com/v4/letter/c/db5fbb/32.png) [@chari](https://discuss.elastic.co/u/chari)\
**Post date:** [June 8, 2020, 4:17pm UTC](https://discuss.elastic.co/t/using-shingle-and-stop-filters/236067/2 "2020-06-08T16:17:48Z")

</div>

I have filtered shingles ii) and iii).  
When I query using a bool must clause with the same string, i would expect hits that matches either or both shingles i) and iv) only.  
Is the expectation correct ? Right now I see hits that match shingles ii) too.

---

<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, 2020, 4:17pm UTC](https://discuss.elastic.co/t/using-shingle-and-stop-filters/236067/3 "2020-07-06T16:17:52Z")

</div>

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