@@ -51,11 +51,11 @@ def test_unescape(self):
51
51
def test_query_parsed (self ):
52
52
self .assertEqual (
53
53
generate_query_parsed ('foo' , u'abc' ),
54
- {'match ' : {'foo' : u'abc' }})
54
+ {'text ' : {'foo' : u'abc' }})
55
55
56
56
self .assertEqual (
57
57
generate_query_parsed ('foo' , u'abc def' ),
58
- {'match ' : {'foo' : u'abc def' }},
58
+ {'text ' : {'foo' : u'abc def' }},
59
59
)
60
60
61
61
self .assertEqual (
@@ -64,9 +64,9 @@ def test_query_parsed(self):
64
64
'bool' : {
65
65
'minimum_should_match' : 1 ,
66
66
'should' : [
67
- {'match ' : {'foo' : u'abc' }},
68
- {'match_phrase ' : {'foo' : u'def' }},
69
- {'match ' : {'foo' : u'ghi' }},
67
+ {'text ' : {'foo' : u'abc' }},
68
+ {'text_phrase ' : {'foo' : u'def' }},
69
+ {'text ' : {'foo' : u'ghi' }},
70
70
]
71
71
}
72
72
}
@@ -77,8 +77,8 @@ def test_query_parsed(self):
77
77
{
78
78
'bool' : {
79
79
'must' : [
80
- {'match ' : {'foo' : u'abc' }},
81
- {'match_phrase ' : {'foo' : u'def' }},
80
+ {'text ' : {'foo' : u'abc' }},
81
+ {'text_phrase ' : {'foo' : u'def' }},
82
82
]
83
83
}
84
84
}
@@ -90,11 +90,11 @@ def test_query_parsed(self):
90
90
'bool' : {
91
91
'minimum_should_match' : 1 ,
92
92
'should' : [
93
- {'match ' : {'foo' : u'abc' }},
93
+ {'text ' : {'foo' : u'abc' }},
94
94
{'bool' : {
95
95
'must' : [
96
- {'match_phrase ' : {'foo' : u'def' }},
97
- {'match ' : {'foo' : u'ghi' }},
96
+ {'text_phrase ' : {'foo' : u'def' }},
97
+ {'text ' : {'foo' : u'ghi' }},
98
98
]
99
99
}}
100
100
]
@@ -107,12 +107,12 @@ def test_query_parsed(self):
107
107
{
108
108
'bool' : {
109
109
'must' : [
110
- {'match ' : {'foo' : u'abc' }},
110
+ {'text ' : {'foo' : u'abc' }},
111
111
{'bool' : {
112
112
'minimum_should_match' : 1 ,
113
113
'should' : [
114
- {'match_phrase ' : {'foo' : u'def' }},
115
- {'match ' : {'foo' : u'ghi' }},
114
+ {'text_phrase ' : {'foo' : u'def' }},
115
+ {'text ' : {'foo' : u'ghi' }},
116
116
]
117
117
}}
118
118
]
@@ -122,7 +122,7 @@ def test_query_parsed(self):
122
122
123
123
self .assertEqual (
124
124
generate_query_parsed ('foo' , u'14.1\\ " screen' ),
125
- {'match ' : {'foo' : u'14.1" screen' }}
125
+ {'text ' : {'foo' : u'14.1" screen' }}
126
126
)
127
127
128
128
def test_query_parsed_edge_cases (self ):
@@ -131,7 +131,7 @@ def test_query_parsed_edge_cases(self):
131
131
{
132
132
'bool' : {
133
133
'must' : [
134
- {'match_phrase ' : {'foo' : u'def' }}
134
+ {'text_phrase ' : {'foo' : u'def' }}
135
135
]
136
136
}
137
137
}
@@ -142,18 +142,18 @@ def test_query_parsed_edge_cases(self):
142
142
{
143
143
'bool' : {
144
144
'must' : [
145
- {'match_phrase ' : {'foo' : u'def' }}
145
+ {'text_phrase ' : {'foo' : u'def' }}
146
146
]
147
147
}
148
148
}
149
149
)
150
150
151
151
self .assertEqual (
152
152
generate_query_parsed ('foo' , u'foo\\ bar' ),
153
- {'match ' : {'foo' : u'foobar' }}
153
+ {'text ' : {'foo' : u'foobar' }}
154
154
)
155
155
156
156
self .assertEqual (
157
157
generate_query_parsed ('foo' , u'foo\\ \\ bar' ),
158
- {'match ' : {'foo' : u'foo\\ bar' }}
158
+ {'text ' : {'foo' : u'foo\\ bar' }}
159
159
)
0 commit comments