[DOCS] Reformat pattern_replace token filter#57699
[DOCS] Reformat pattern_replace token filter#57699jrodewig merged 5 commits intoelastic:masterfrom jrodewig:docs__reformat-pattern-replace-tokenfilter
pattern_replace token filter#57699Conversation
Changes: * Rewrites description and adds Lucene link * Adds analyze example * Adds parameter definitions * Adds custom analyzer example
|
Pinging @elastic/es-search (:Search/Search) |
|
Pinging @elastic/es-docs (>docs) |
pattern_replace tokenfilterpattern_replace token filter docs
pattern_replace token filter docspattern_replace token filter
| The `my_pattern_replace_filter` filter uses the regular expression `\\p{Sc}` to | ||
| match and remove currency symbols, such as `£`, `€`, or `$`. The filter's `all` | ||
| parameter is `false`, meaning only the first matching symbol in each token is | ||
| removed. |
There was a problem hiding this comment.
I did not know \\p{Sc} was a thing so thanks for educating me :)
While these more esoteric functions work in token filters they are not supported in RegExp query syntax.
I wonder if it's worth doing one of two things here:
A) Add a footnote to the effect of "* note this particular expression wouldn't work with RegExp queries which use a different regex parser" or
B) Use a different example that works in both "pattern_replace" token filters and RegExp queries.
There was a problem hiding this comment.
Thanks @markharwood. With 992ab1c, I updated the example to use a pattern that compatible with the RegExp query.
markharwood
left a comment
There was a problem hiding this comment.
LGTM.
Thanks, @jrodewig
|
Thanks @markharwood. |
Changes: * Rewrites description and adds Lucene link * Adds analyze example * Adds parameter definitions * Adds custom analyzer example
Changes: * Rewrites description and adds Lucene link * Adds analyze example * Adds parameter definitions * Adds custom analyzer example
Changes: * Rewrites description and adds Lucene link * Adds analyze example * Adds parameter definitions * Adds custom analyzer example
Changes: