[DOCS] Use keyword tokenizer in word delimiter graph examples (#53384)

In a tip admonition, we recommend using the `keyword` tokenizer with the
`word_delimiter_graph` token filter. However, we only use the
`whitespace` tokenizer in the example snippets. This updates those
snippets to use the `keyword` tokenizer instead.

Also corrects several spacing issues for arrays in these docs.
This commit is contained in:
James Rodewig 2020-03-11 04:45:26 -04:00
parent 7189c57b6c
commit a9dd7773d2
1 changed files with 54 additions and 54 deletions

View File

@ -40,16 +40,16 @@ hyphens, we recommend using the
==== Example
The following <<indices-analyze,analyze API>> request uses the
`word_delimiter_graph` filter to split `Neil's Super-Duper-XL500--42+AutoCoder`
`word_delimiter_graph` filter to split `Neil's-Super-Duper-XL500--42+AutoCoder`
into normalized tokens using the filter's default rules:
[source,console]
----
GET /_analyze
{
"tokenizer": "whitespace",
"tokenizer": "keyword",
"filter": [ "word_delimiter_graph" ],
"text": "Neil's Super-Duper-XL500--42+AutoCoder"
"text": "Neil's-Super-Duper-XL500--42+AutoCoder"
}
----
@ -141,7 +141,7 @@ PUT /my_index
"analysis": {
"analyzer": {
"my_analyzer": {
"tokenizer": "whitespace",
"tokenizer": "keyword",
"filter": [ "word_delimiter_graph" ]
}
}
@ -277,8 +277,8 @@ Defaults to `true`.
(Optional, boolean)
If `true`, the filter includes the original version of any split tokens in the
output. This original version includes non-alphanumeric delimiters. For example:
`super-duper-xl-500` -> [**`super-duper-xl-500`**, `super`, `duper`, `xl`, `500`
]. Defaults to `false`.
`super-duper-xl-500` -> [ **`super-duper-xl-500`**, `super`, `duper`, `xl`,
`500` ]. Defaults to `false`.
[WARNING]
====
@ -319,7 +319,7 @@ If `true`, the filter splits tokens at letter-number transitions. For example:
`stem_english_possessive`::
(Optional, boolean)
If `true`, the filter removes the English possessive (`'s`) from the end of each
token. For example: `O'Neil's` -> `[ `O`, `Neil` ]. Defaults to `true`.
token. For example: `O'Neil's` -> [ `O`, `Neil` ]. Defaults to `true`.
`type_table`::
+
@ -408,7 +408,7 @@ PUT /my_index
"analysis": {
"analyzer": {
"my_analyzer": {
"tokenizer": "whitespace",
"tokenizer": "keyword",
"filter": [ "my_custom_word_delimiter_graph_filter" ]
}
},