rest-api-spec.test.mlt.30_unlike.yml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rest-api-spec Show documentation
Show all versions of rest-api-spec Show documentation
OpenSearch subproject :rest-api-spec
The newest version!
---
"Basic mlt query with unlike":
- do:
indices.create:
index: test_1
body:
settings:
number_of_replicas: 0
- do:
index:
index: test_1
id: 1
body: { foo: bar baz selected }
- do:
index:
index: test_1
id: 2
body: { foo: bar }
- do:
index:
index: test_1
id: 3
body: { foo: bar baz }
- do:
indices.refresh: {}
- do:
cluster.health:
wait_for_status: green
- do:
search:
rest_total_hits_as_int: true
index: test_1
body:
query:
more_like_this:
like:
_index: test_1
_id: 1
unlike:
_index: test_1
_id: 3
include: true
min_doc_freq: 0
min_term_freq: 0
- match: { hits.total: 1 }
© 2015 - 2024 Weber Informatics LLC | Privacy Policy