WARNING: Version 2.4 of Elasticsearch has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Shingle Token Filter
editShingle Token Filter
editA token filter of type shingle
that constructs shingles (token
n-grams) from a token stream. In other words, it creates combinations of
tokens as a single token. For example, the sentence "please divide this
sentence into shingles" might be tokenized into shingles "please
divide", "divide this", "this sentence", "sentence into", and "into
shingles".
This filter handles position increments > 1 by inserting filler tokens (tokens with termtext "_"). It does not handle a position increment of 0.
The following are settings that can be set for a shingle
token filter
type:
Setting | Description |
---|---|
|
The maximum shingle size. Defaults to |
|
The minimum shingle size. Defaults to |
|
If |
|
If |
|
The string to use when joining adjacent tokens to
form a shingle. Defaults to |
|
The string to use as a replacement for each position
at which there is no actual token in the stream. For instance this string is
used if the position increment is greater than one when a |