2014-02-11 20:08:10 -05:00
|
|
|
---
|
|
|
|
"Basic percolation highlight query test":
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.create:
|
|
|
|
index: test_index
|
2014-07-18 16:50:07 -04:00
|
|
|
body:
|
|
|
|
mappings:
|
|
|
|
type_1:
|
|
|
|
properties:
|
|
|
|
foo:
|
|
|
|
type: string
|
2014-02-11 20:08:10 -05:00
|
|
|
|
|
|
|
- do:
|
|
|
|
index:
|
|
|
|
index: test_index
|
|
|
|
type: .percolator
|
|
|
|
id: test_percolator
|
|
|
|
body:
|
|
|
|
query:
|
|
|
|
match:
|
|
|
|
foo: bar
|
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.refresh: {}
|
|
|
|
|
|
|
|
- do:
|
|
|
|
percolate:
|
|
|
|
index: test_index
|
|
|
|
type: test_type
|
|
|
|
body:
|
|
|
|
doc:
|
|
|
|
foo: "bar foo"
|
|
|
|
size: 1
|
|
|
|
highlight:
|
|
|
|
fields:
|
|
|
|
foo:
|
|
|
|
highlight_query:
|
|
|
|
match:
|
|
|
|
foo: foo
|
|
|
|
|
|
|
|
- match: {'total': 1}
|