# Fuzzy searching on shingles filter getting problem for search

**URL:** <https://discuss.elastic.co/t/fuzzy-searching-on-shingles-filter-getting-problem-for-search/152154>\
**Category:** Elasticsearch\
**Created:** [October 12, 2018, 4:41am UTC](https://discuss.elastic.co/t/fuzzy-searching-on-shingles-filter-getting-problem-for-search/152154 "2018-10-12T04:41:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishalg](https://avatars.discourse-cdn.com/v4/letter/v/ac8455/32.png) [@vishalg](https://discuss.elastic.co/u/vishalg)\
**Post date:** [October 12, 2018, 4:41am UTC](https://discuss.elastic.co/t/fuzzy-searching-on-shingles-filter-getting-problem-for-search/152154/1 "2018-10-12T04:41:09Z")

</div>

Query: How to apply fuzziness on every token produced by shingles filter?

Below is my created mapping:  
{  
"settings":{  
"index":{  
"number\_of\_shards" : 1,  
"number\_of\_replicas" : 0 ,  
"analysis":{  
"filter": {  
"my\_synonym\_filter": {  
"type": "synonym",  
"tokenizer" : "standard",  
"synonyms":[  
"nwm,northwestern mutual wealth management=\> northwestern mutual wealth management"  
]  
},  
"filter\_shingle":{  
"type":"shingle",  
"tokenizer" : "standard",  
"max\_shingle\_size":10,  
"min\_shingle\_size":2,  
"output\_unigrams":"true"  
}  
},  
"analyzer":{  
"analyzer\_case\_insensitive":{  
"tokenizer": "keyword",  
"filter":["lowercase","my\_synonym\_filter"]  
},  
"analyzer\_shingle":{  
"tokenizer": "standard",  
"filter":["lowercase","my\_synonym\_filter","filter\_shingle"]  
}  
}  
}  
},  
"index.mapping.total\_fields.limit": 9000000000000000000  
},  
"mappings" : {  
"docs" : {  
"properties" : {  
"aliases" : {  
"type" : "text",  
"analyzer":"analyzer\_case\_insensitive",  
"search\_analyzer":"analyzer\_shingle",  
"fields" : {  
"text" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
{  
"not\_recognized" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"tagName" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
}  
}  
}  
}  
}

Below is my query:  
{  
"query": {  
"bool": {  
"should": [  
{  
"bool": {  
"should": [  
{  
"match": {  
"aliases":  
{  
"query": "nwm sals",  
"fuzziness": 2  
}  
}  
}  
]  
}  
}  
]}  
}}

so from above query shingles filter produces combination of words from the statement "northwestern mutual wealth management sals"

so i am expecting to apply fuzziness on each token produced by shingles filter and display the results according.  
I am using elasticsearch 5.4.0 version  
here from my query fuzziness is not getting applied on any token ..am i missing something?

Please let me know about this as i am stuck into it.

---

<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 9, 2018, 4:41am UTC](https://discuss.elastic.co/t/fuzzy-searching-on-shingles-filter-getting-problem-for-search/152154/2 "2018-11-09T04:41:10Z")

</div>

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