Docs: Fixed pattern-capture token filter example

Closes #10690
This commit is contained in:
Clinton Gormley 2015-04-25 19:27:55 +02:00
parent 86c2c202fe
commit cf177c32d4
1 changed files with 5 additions and 4 deletions

View File

@ -82,7 +82,7 @@ curl -XPUT localhost:9200/test/ -d '
"type" : "pattern_capture", "type" : "pattern_capture",
"preserve_original" : 1, "preserve_original" : 1,
"patterns" : [ "patterns" : [
"(\\w+)", "([^@]+)",
"(\\p{L}+)", "(\\p{L}+)",
"(\\d+)", "(\\d+)",
"@(.+)" "@(.+)"
@ -108,9 +108,10 @@ When the above analyzer is used on an email address like:
john-smith_123@foo-bar.com john-smith_123@foo-bar.com
-------------------------------------------------- --------------------------------------------------
it would produce the following tokens: [ `john-smith_123`, it would produce the following tokens:
`foo-bar.com`, `john`, `smith_123`, `smith`, `123`, `foo`,
`foo-bar.com`, `bar`, `com` ] john-smith_123@foo-bar.com, john-smith_123,
john, smith, 123, foo-bar.com, foo, bar, com
Multiple patterns are required to allow overlapping captures, but also Multiple patterns are required to allow overlapping captures, but also
means that patterns are less dense and easier to understand. means that patterns are less dense and easier to understand.