How do I control the intensity of phonetic search mapping?

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...

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?

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. :wink: