OpenSearch/rest-api-spec/test/mlt/30_unlike.yaml
Alex Ksikes 3f6dae1a73 More Like This: renamed ignore_like to unlike
This changes the parameter name `ignore_like` to the more user friendly name
`unlike`. This later feature generates a query from the terms in `A` but not
from the terms in `B`. This translates to a result set which is like `A` but
unlike `B`. We could have further negatively boosted any documents that have
some `B`, but these documents already do not receive any contribution from
having `B`, and would therefore negatively compete with documents having `A`.

Closes #11117
2015-06-17 17:18:50 -05:00

57 lines
1.1 KiB
YAML

---
"Basic mlt query with unlike":
- 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
unlike:
_index: test_1
_type: test
_id: 3
include: true
min_doc_freq: 0
min_term_freq: 0
- match: { hits.total: 1 }