2014-01-20 12:18:06 -05:00
|
|
|
---
|
|
|
|
"Percolate existing documents":
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.create:
|
|
|
|
index: percolator_index
|
|
|
|
|
|
|
|
- do:
|
|
|
|
index:
|
|
|
|
index: percolator_index
|
|
|
|
type: .percolator
|
|
|
|
id: test_percolator
|
|
|
|
body:
|
|
|
|
query:
|
|
|
|
match_all: {}
|
2015-02-10 07:51:50 -05:00
|
|
|
tag: tag1
|
2014-01-20 12:18:06 -05:00
|
|
|
|
|
|
|
- do:
|
|
|
|
index:
|
|
|
|
index: percolator_index
|
|
|
|
type: test_type
|
|
|
|
id: 1
|
|
|
|
body:
|
|
|
|
foo: bar
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.create:
|
|
|
|
index: my_index
|
|
|
|
|
|
|
|
- do:
|
|
|
|
index:
|
|
|
|
index: my_index
|
|
|
|
type: my_type
|
|
|
|
id: 1
|
|
|
|
body:
|
|
|
|
foo: bar
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.refresh: {}
|
|
|
|
|
|
|
|
- do:
|
|
|
|
percolate:
|
|
|
|
index: percolator_index
|
|
|
|
type: test_type
|
|
|
|
id: 1
|
|
|
|
|
|
|
|
- match: {'matches': [{_index: percolator_index, _id: test_percolator}]}
|
|
|
|
|
|
|
|
- do:
|
|
|
|
percolate:
|
|
|
|
index: my_index
|
|
|
|
type: my_type
|
|
|
|
id: 1
|
|
|
|
percolate_index: percolator_index
|
|
|
|
percolate_type: test_type
|
|
|
|
|
|
|
|
- match: {'matches': [{_index: percolator_index, _id: test_percolator}]}
|
|
|
|
|
|
|
|
|
|
|
|
- do:
|
|
|
|
index:
|
|
|
|
index: my_index
|
|
|
|
type: my_type
|
|
|
|
id: 1
|
|
|
|
body:
|
|
|
|
foo: bar
|
|
|
|
|
|
|
|
- do:
|
|
|
|
percolate:
|
|
|
|
index: my_index
|
|
|
|
type: my_type
|
|
|
|
id: 1
|
|
|
|
version: 2
|
|
|
|
percolate_index: percolator_index
|
|
|
|
percolate_type: test_type
|
|
|
|
|
|
|
|
- match: {'matches': [{_index: percolator_index, _id: test_percolator}]}
|
|
|
|
|
|
|
|
- do:
|
|
|
|
catch: conflict
|
|
|
|
percolate:
|
|
|
|
index: my_index
|
|
|
|
type: my_type
|
|
|
|
id: 1
|
|
|
|
version: 1
|
|
|
|
percolate_index: percolator_index
|
2014-01-21 10:30:55 -05:00
|
|
|
percolate_type: test_type
|
2015-02-10 07:51:50 -05:00
|
|
|
|
|
|
|
- do:
|
|
|
|
percolate:
|
|
|
|
index: percolator_index
|
|
|
|
type: test_type
|
|
|
|
id: 1
|
|
|
|
body:
|
|
|
|
filter:
|
|
|
|
term:
|
|
|
|
tag: non_existing_tag
|
|
|
|
|
|
|
|
- match: {'matches': []}
|
|
|
|
|
|
|
|
- do:
|
|
|
|
percolate:
|
|
|
|
index: percolator_index
|
|
|
|
type: test_type
|
|
|
|
id: 1
|
|
|
|
body:
|
|
|
|
filter:
|
|
|
|
term:
|
|
|
|
tag: tag1
|
|
|
|
|
|
|
|
- match: {'matches': [{_index: percolator_index, _id: test_percolator}]}
|
|
|
|
|