Skip to content

Commit

Permalink
Add a test for PorterStemTokenFilter
Browse files Browse the repository at this point in the history
Signed-off-by: Ebrahim Byagowi <[email protected]>
  • Loading branch information
ebraminio committed Jul 23, 2024
1 parent bf2772a commit 3b60a47
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions tests/_core/search/porter_stem_token_filter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
$schema: ../../../json_schemas/test_story.schema.yaml

description: Test Porter filter
prologues:
- path: /movies
method: PUT
request_body:
payload:
settings:
analysis:
analyzer:
my_analyzer:
tokenizer: whitespace
filter: ['lowercase', 'porter_stem']

Check failure on line 14 in tests/_core/search/porter_stem_token_filter.yaml

View workflow job for this annotation

GitHub Actions / lint

Must use plain style scalar

Check failure on line 14 in tests/_core/search/porter_stem_token_filter.yaml

View workflow job for this annotation

GitHub Actions / lint

Must use plain style scalar
status: [200]
- path: /movies/_doc
method: POST
parameters:
refresh: true
request_body:
payload:
director: Consolingly
title: Moneyball
year: 2011
status: [201]
epilogues:
- path: /movies
method: DELETE
status: [200, 404]
chapters:
- synopsis: Search with a match query field.
path: /{index}/_search
parameters:
index: movies
method: POST
request_body:
payload:
size: 1
query:
match:
director: Consolingli

Check failure on line 41 in tests/_core/search/porter_stem_token_filter.yaml

View workflow job for this annotation

GitHub Actions / lint

Unknown word: "Consolingli"
response:
status: 200
payload:
timed_out: false
hits:
total:
value: 1
relation: eq
hits:
- _index: movies
_source:
director: Consolingly
title: Moneyball
year: 2011

0 comments on commit 3b60a47

Please sign in to comment.