forked from kmikkel/elasticsearch-workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
16-highlight.feature
35 lines (33 loc) · 889 Bytes
/
16-highlight.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Feature: Highlighting matched terms
# Use: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-highlighting.html
Scenario: Find the pizzas with a name that contains the word "Bacon" and highlight the word "Bacon"
Given all pizzas are indexed
When I make a query
"""
{ todo }
"""
Then the response should contain
"""
{
"hits":{
"total":1,
"hits": [
{
"_source": {
"topping": [
"Bacon"
],
"id": 2,
"weight": 680,
"name": "American Bacon"
},
"highlight": {
"name": [
"American <em>Bacon</em>"
]
}
}
]
}
}
"""