57 lines
1.1 KiB
YAML
57 lines
1.1 KiB
YAML
---
|
|
"Basic mlt query with ignore like":
|
|
- do:
|
|
indices.create:
|
|
index: test_1
|
|
body:
|
|
settings:
|
|
number_of_replicas: 0
|
|
- do:
|
|
index:
|
|
index: test_1
|
|
type: test
|
|
id: 1
|
|
body: { foo: bar baz selected }
|
|
|
|
- do:
|
|
index:
|
|
index: test_1
|
|
type: test
|
|
id: 2
|
|
body: { foo: bar }
|
|
|
|
- do:
|
|
index:
|
|
index: test_1
|
|
type: test
|
|
id: 3
|
|
body: { foo: bar baz }
|
|
|
|
- do:
|
|
indices.refresh: {}
|
|
|
|
- do:
|
|
cluster.health:
|
|
wait_for_status: green
|
|
|
|
- do:
|
|
search:
|
|
index: test_1
|
|
type: test
|
|
body:
|
|
query:
|
|
more_like_this:
|
|
like:
|
|
_index: test_1
|
|
_type: test
|
|
_id: 1
|
|
ignore_like:
|
|
_index: test_1
|
|
_type: test
|
|
_id: 3
|
|
include: true
|
|
min_doc_freq: 0
|
|
min_term_freq: 0
|
|
|
|
- match: { hits.total: 1 }
|