forked from kmikkel/elasticsearch-workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path05-term-query.feature
36 lines (32 loc) · 932 Bytes
/
05-term-query.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
36
Feature: Term level queries (exact terms)
# Use: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.html
# Extra info: As you can see from the elasticsearch documentation, string
# fields should be set to not_analyzed when using term queries. We have
# already done this for 'topping' in mapping.json.
# Can you figure out the difference between "match" and "term"?
Scenario: Find the pizzas that has "Marinated Beef" topping
Given all pizzas are indexed
When I make a query
"""
{ todo }
"""
Then the response should contain
"""
{
"hits":{
"total":1,
"hits":[
{
"_source":{
"topping":[
"Meatballs",
"Marinated Beef",
"Bacon"
],
"name":"Take Away Meat Lover"
}
}
]
}
}
"""