2013-08-28 19:24:34 -04:00
|
|
|
[[analysis-whitespace-analyzer]]
|
|
|
|
=== Whitespace Analyzer
|
|
|
|
|
2016-05-11 08:17:56 -04:00
|
|
|
The `whitespace` analyzer breaks text into terms whenever it encounters a
|
|
|
|
whitespace character.
|
|
|
|
|
|
|
|
[float]
|
|
|
|
=== Definition
|
|
|
|
|
|
|
|
It consists of:
|
|
|
|
|
|
|
|
Tokenizer::
|
|
|
|
* <<analysis-whitespace-tokenizer,Whitespace Tokenizer>>
|
|
|
|
|
|
|
|
[float]
|
|
|
|
=== Example output
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
---------------------------
|
|
|
|
POST _analyze
|
|
|
|
{
|
|
|
|
"analyzer": "whitespace",
|
|
|
|
"text": "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone."
|
|
|
|
}
|
|
|
|
---------------------------
|
|
|
|
// CONSOLE
|
|
|
|
|
|
|
|
The above sentence would produce the following terms:
|
|
|
|
|
|
|
|
[source,text]
|
|
|
|
---------------------------
|
|
|
|
[ The, 2, QUICK, Brown-Foxes, jumped, over, the, lazy, dog's, bone. ]
|
|
|
|
---------------------------
|
|
|
|
|
|
|
|
[float]
|
|
|
|
=== Configuration
|
|
|
|
|
|
|
|
The `whitespace` analyzer is not configurable.
|