mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 18:35:25 +00:00
1. Move the "text format" test into separate file 2. Remove the "JSON format" from test names
45 lines
971 B
YAML
45 lines
971 B
YAML
---
|
|
"Basic test":
|
|
- do:
|
|
indices.analyze:
|
|
text: Foo Bar
|
|
- length: { tokens: 2 }
|
|
- match: { tokens.0.token: foo }
|
|
- match: { tokens.1.token: bar }
|
|
|
|
---
|
|
"Tokenizer and filter":
|
|
- do:
|
|
indices.analyze:
|
|
filters: lowercase
|
|
text: Foo Bar
|
|
tokenizer: keyword
|
|
- length: { tokens: 1 }
|
|
- match: { tokens.0.token: foo bar }
|
|
|
|
---
|
|
"Index and field":
|
|
- do:
|
|
indices.create:
|
|
index: test
|
|
body:
|
|
mappings:
|
|
test:
|
|
properties:
|
|
text:
|
|
type: string
|
|
analyzer: whitespace
|
|
- do:
|
|
cluster.health:
|
|
wait_for_status: yellow
|
|
|
|
|
|
- do:
|
|
indices.analyze:
|
|
field: text
|
|
index: test
|
|
text: Foo Bar!
|
|
- length: { tokens: 2 }
|
|
- match: { tokens.0.token: Foo }
|
|
- match: { tokens.1.token: Bar! }
|