# How do I control the intensity of phonetic search mapping?

**URL:** <https://discuss.elastic.co/t/how-do-i-control-the-intensity-of-phonetic-search-mapping/34670>\
**Category:** Elasticsearch\
**Created:** [November 16, 2015, 11:33am UTC](https://discuss.elastic.co/t/how-do-i-control-the-intensity-of-phonetic-search-mapping/34670 "2015-11-16T11:33:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nylz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nylz/32/5940_2.png) [@nylz](https://discuss.elastic.co/u/nylz)\
**Post date:** [November 16, 2015, 11:33am UTC](https://discuss.elastic.co/t/how-do-i-control-the-intensity-of-phonetic-search-mapping/34670/1 "2015-11-16T11:33:34Z")

</div>

Hi there,

I'm using ES with "analysis phonetic". My problem right now is, that the results of a phonetic search are too lenient.  
Is there a way to set something like a "phonetic-tolerance-controller-level" or "phonetic-depth-level"?

current way of creating the phonetic index:  
... {"type" : "phonetic","encoder" :"cologne","replace" : false } ...

thx in advance...

---

<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:** [November 16, 2015, 1:21pm UTC](https://discuss.elastic.co/t/how-do-i-control-the-intensity-of-phonetic-search-mapping/34670/2 "2015-11-16T13:21:24Z")

</div>

I have no idea.

Is it something which exists in Lucene? If so we can expose it in the phonetic plugin: in that case, feel free to open an issue or a pull request.

If it does not exist, then you could open a [JIRA on Lucene project](https://issues.apache.org/jira/browse/LUCENE/)?

---

<div class="post-metadata">

**Author:** ![nylz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nylz/32/5940_2.png) [@nylz](https://discuss.elastic.co/u/nylz)\
**Post date:** [December 1, 2015, 3:43pm UTC](https://discuss.elastic.co/t/how-do-i-control-the-intensity-of-phonetic-search-mapping/34670/3 "2015-12-01T15:43:49Z")

</div>

I found a way to solve my problem: "boosts".

```
{
    "explain": true,
    "query": {
        "bool": {
            "should": [
                {
                    "match": {
                        "FIRSTNAME": {
                            "query": "john",
                            "boost": 2
                        }
                    }
                },
                {
                    "match": {
                        "FIRSTNAME.phonetic": "john"
                    }
                }
            ]
        }
    }
} 

```

This raises the priority "John" over the numeric results of the phonetic algorithms.  
So I got a bit misled by misunderstanding of how this technology works in detail. 😉

---

<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 5, 2017, 11:34pm UTC](https://discuss.elastic.co/t/how-do-i-control-the-intensity-of-phonetic-search-mapping/34670/4 "2017-07-05T23:34:25Z")

</div>


