Skip to content

Commit

Permalink
Removed void token filter entries and added two tests
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnvg committed Oct 5, 2017
1 parent a40c474 commit b27e408
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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: বার }
Original file line number Diff line number Diff line change
Expand Up @@ -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: কর }
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,6 @@ private static String toCamelCase(String s) {
.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
Expand Down

0 comments on commit b27e408

Please sign in to comment.