OpenSearch/rest-api-spec/test/mlt/20_docs.yaml

61 lines
1.2 KiB
YAML
Raw Normal View History

---
"Basic mlt query with docs":
- do:
indices.create:
index: test_1
body:
settings:
number_of_replicas: 0
- do:
index:
index: test_1
type: test
id: 1
body: { foo: bar }
- do:
index:
index: test_1
type: test
id: 2
body: { foo: baz }
- do:
index:
index: test_1
type: test
id: 3
body: { foo: foo }
- do:
indices.refresh: {}
- do:
cluster.health:
wait_for_status: green
- do:
search:
index: test_1
type: test
body:
query:
more_like_this:
docs:
-
_index: test_1
_type: test
doc:
foo: bar
-
_index: test_1
_type: test
_id: 2
ids:
- 3
include: true
min_doc_freq: 0
min_term_freq: 0
- match: { hits.total: 3 }