2014-09-15 10:17:49 -04:00
|
|
|
---
|
|
|
|
"Basic mlt query with docs":
|
2014-09-30 16:42:51 -04:00
|
|
|
- do:
|
|
|
|
indices.create:
|
|
|
|
index: test_1
|
|
|
|
body:
|
|
|
|
settings:
|
|
|
|
number_of_replicas: 0
|
2014-09-15 10:17:49 -04:00
|
|
|
- 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 }
|