Removed void token filter entries and added two tests

This commit is contained in:
Martijn van Groningen 2017-10-05 10:33:50 +02:00
parent a40c474e10
commit b27e408ed2
No known key found for this signature in database
GPG Key ID: AB236F4FCF2AF12A
3 changed files with 33 additions and 3 deletions

View File

@ -27,3 +27,13 @@
- match: { detail.analyzer.tokens.1.start_offset: 4 }
- match: { detail.analyzer.tokens.1.end_offset: 8 }
- match: { detail.analyzer.tokens.1.position: 1 }
---
"bengali":
- do:
indices.analyze:
body:
text: বাড়ী
analyzer: bengali
- length: { tokens: 1 }
- match: { tokens.0.token: বার }

View File

@ -1506,3 +1506,26 @@
filter: [russian_stem]
- length: { tokens: 1 }
- match: { tokens.0.token: журнал }
---
"bengali_stem":
- do:
indices.create:
index: test
body:
settings:
analysis:
filter:
my_bengali_stem:
type: stemmer
language: bengali
- do:
indices.analyze:
index: test
body:
text: করেছিলাম
tokenizer: keyword
filter: [my_bengali_stem]
- length: { tokens: 1 }
- match: { tokens.0.token: কর }

View File

@ -193,9 +193,6 @@ public abstract class AnalysisFactoryTestCase extends ESTestCase {
.put("flattengraph", MovedToAnalysisCommon.class)
// TODO: these tokenfilters are not yet exposed: useful?
.put("bengalinormalization", Void.class)
.put("bengalistem", Void.class)
// suggest stop
.put("suggeststop", Void.class)
// capitalizes tokens