OpenSearch/plugins/analysis-kuromoji/rest-api-spec/test/analysis_kuromoji/20_search.yaml

36 lines
719 B
YAML
Raw Normal View History

# Integration tests for Kuromoji analysis components
#
---
"Index kuromoji content":
- do:
indices.create:
index: test
body:
mappings:
type:
properties:
text:
type: string
analyzer: kuromoji
- do:
cluster.health:
wait_for_status: yellow
- do:
index:
index: test
type: type
id: 1
body: { "text": "JR新宿駅の近くにビールを飲みに行こうか" }
- do:
indices.refresh: {}
- do:
search:
index: test
body:
query:
match:
text: jr
- match: { hits.total: 1 }