43 lines
819 B
YAML
43 lines
819 B
YAML
---
|
|
"Basic percolation highlight query test":
|
|
|
|
- do:
|
|
indices.create:
|
|
index: test_index
|
|
body:
|
|
mappings:
|
|
type_1:
|
|
properties:
|
|
foo:
|
|
type: string
|
|
|
|
- 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}
|