PatternReplaceFilter behaviour

I was going through https://github.com/elasticsearch/elasticsearch/pull/1108

It's mentioned there that "By default the replacement expression is an
empty string."

My question is the same as what @ timbunce comment is?

Also what if I put a stopword in the "replacement" parameter and use a stop
filter after it in the analysis chain?

--

Regards,
Varun Thacker
http://www.vthacker.in/

--

Hi,

I don't recommend you to use the TOTO nor for removing tokens nor for
replacing tokens by other tokens. Filters exist just for that purpose, for
example for removing tokens TATA and TITI and for replacing tokens TUTU.

In my opinion, it should be used only when you "need" the power of pattern
matching for applying transformations to tokens.

Regards

Benjamin

--