# Shingle: Avoid result if another contains the substring

**URL:** <https://discuss.elastic.co/t/shingle-avoid-result-if-another-contains-the-substring/176572>\
**Category:** Elasticsearch\
**Created:** [April 12, 2019, 8:18am UTC](https://discuss.elastic.co/t/shingle-avoid-result-if-another-contains-the-substring/176572 "2019-04-12T08:18:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![arkkanoid](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@arkkanoid](https://discuss.elastic.co/u/arkkanoid)\
**Post date:** [April 12, 2019, 8:18am UTC](https://discuss.elastic.co/t/shingle-avoid-result-if-another-contains-the-substring/176572/1 "2019-04-12T08:18:56Z")

</div>

I'm trying to implement a solution to get words that match with my query using Shingle.  
My problem is that querying this phrase: "I want to search Big Data", the results are:  
"big"  
"data"  
"big data"

Is there some way to get only the last result that match with the whole phrase?

The analyzer I'm using is:

```
                "analyzer": {
                    "my_analyzer_shingle": {
                        "filter": [
                            "asciifolding",
                            "lowercase",
                            "shingle"
                        ],
                        "max_shingle_size": "4",
                        "type": "custom",
                        "tokenizer": "standard"
                    },

```

Thanks

---

<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:** [May 10, 2019, 8:19am UTC](https://discuss.elastic.co/t/shingle-avoid-result-if-another-contains-the-substring/176572/2 "2019-05-10T08:19:00Z")

</div>

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