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

55 lines
1.1 KiB
YAML
Raw Normal View History

---
"Basic mlt query with docs":
- 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 }