# Custom analysis, phonetic filter and highlighting

**URL:** <https://discuss.elastic.co/t/custom-analysis-phonetic-filter-and-highlighting/16567>\
**Category:** Elasticsearch\
**Created:** [March 24, 2014, 5:03pm UTC](https://discuss.elastic.co/t/custom-analysis-phonetic-filter-and-highlighting/16567 "2014-03-24T17:03:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Erdal\_Gunyar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/erdal_gunyar/32/1702_2.png) [@Erdal\_Gunyar](https://discuss.elastic.co/u/Erdal_Gunyar)\
**Post date:** [March 24, 2014, 5:03pm UTC](https://discuss.elastic.co/t/custom-analysis-phonetic-filter-and-highlighting/16567/1 "2014-03-24T17:03:57Z")

</div>

Hi everybody ! 🙂

I've got an issue when I try to apply a phonetic filter : I do not have any  
highlight anymore.

Here is the settings used :  
"analysis": {  
"analyzer": {  
"my\_analyzer": {  
"filter": [  
"standard",  
"lowercase",  
"my\_stemmer",  
"my\_phonetic"  
],  
"tokenizer": "standard"  
}  
},  
"filter": {  
"my\_stemmer": {  
"type": "stemmer",  
"replace": "false",  
"name": "french"  
},  
"my\_phonetic": {  
"replace": "false",  
"type": "phonetic",  
"languageset": [  
"french",  
"english",  
"german"  
],  
"encoder": "beidermorse"  
}  
}  
}

Without this filter, more precisely if I use those filters, then it works :  
"my\_analyzer": {  
"filter": [  
"lowercase",  
"asciifolding",  
"my\_stemmer"  
],  
"tokenizer": "standard"  
}

Does anyone can help me ? Or have a piece of idea by any chance ?

Thanks,

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/2a146c45-bfdb-40e6-9f44-2ab369d1d916%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2a146c45-bfdb-40e6-9f44-2ab369d1d916%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Erdal\_Gunyar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/erdal_gunyar/32/1702_2.png) [@Erdal\_Gunyar](https://discuss.elastic.co/u/Erdal_Gunyar)\
**Post date:** [March 25, 2014, 1:12pm UTC](https://discuss.elastic.co/t/custom-analysis-phonetic-filter-and-highlighting/16567/2 "2014-03-25T13:12:09Z")

</div>

Well, since I've posted this message I didn't find any reliable solution,  
it looks like a bug in the phonetic plugin.

There is at least a workaround : as I'm using my custom analysis in \_all,  
the workaround consists to put a more standard analyser on the wanted field  
(for ex. "content") and to use the "highlight\_query" on it. But it will  
only highlight when the standard analyser returns the same query (i.e. when  
if you query "quik" instead of "quick", highlighter won't work).

Have a good day all !

Erdal.

Le lundi 24 mars 2014 18:03:57 UTC+1, Erdal Gunyar a écrit :

> Hi everybody ! 🙂
> 
> I've got an issue when I try to apply a phonetic filter : I do not have  
> any highlight anymore.
> 
> Here is the settings used :  
> "analysis": {  
> "analyzer": {  
> "my\_analyzer": {  
> "filter": [  
> "standard",  
> "lowercase",  
> "my\_stemmer",  
> "my\_phonetic"  
> ],  
> "tokenizer": "standard"  
> }  
> },  
> "filter": {  
> "my\_stemmer": {  
> "type": "stemmer",  
> "replace": "false",  
> "name": "french"  
> },  
> "my\_phonetic": {  
> "replace": "false",  
> "type": "phonetic",  
> "languageset": [  
> "french",  
> "english",  
> "german"  
> ],  
> "encoder": "beidermorse"  
> }  
> }  
> }
> 
> Without this filter, more precisely if I use those filters, then it works :  
> "my\_analyzer": {  
> "filter": [  
> "lowercase",  
> "asciifolding",  
> "my\_stemmer"  
> ],  
> "tokenizer": "standard"  
> }
> 
> Does anyone can help me ? Or have a piece of idea by any chance ?
> 
> Thanks,

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/f4c79190-da38-4ccf-847a-33f46e286aae%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f4c79190-da38-4ccf-847a-33f46e286aae%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 2017, 1:40am UTC](https://discuss.elastic.co/t/custom-analysis-phonetic-filter-and-highlighting/16567/3 "2017-07-06T01:40:49Z")

</div>


