@@ -38,7 +38,6 @@ test('Basic (callback)', t => {
38
38
39
39
client . search ( {
40
40
index : 'test' ,
41
- type : 'doc' ,
42
41
q : 'foo:bar'
43
42
} , ( err , { body } ) => {
44
43
t . error ( err )
@@ -64,7 +63,6 @@ test('Basic (promises)', t => {
64
63
client
65
64
. search ( {
66
65
index : 'test' ,
67
- type : 'doc' ,
68
66
q : 'foo:bar'
69
67
} )
70
68
. then ( ( { body } ) => {
@@ -91,7 +89,6 @@ test('Error (callback)', t => {
91
89
92
90
client . search ( {
93
91
index : 'test' ,
94
- type : 'doc' ,
95
92
q : 'foo:bar'
96
93
} , ( err , { body } ) => {
97
94
t . ok ( err )
@@ -117,7 +114,6 @@ test('Error (promises)', t => {
117
114
client
118
115
. search ( {
119
116
index : 'test' ,
120
- type : 'doc' ,
121
117
q : 'foo:bar'
122
118
} )
123
119
. then ( t . fail )
@@ -143,7 +139,6 @@ test('Abort method (callback)', t => {
143
139
144
140
const request = client . search ( {
145
141
index : 'test' ,
146
- type : 'doc' ,
147
142
q : 'foo:bar'
148
143
} , ( err , { body } ) => {
149
144
t . error ( err )
@@ -170,7 +165,6 @@ test('Abort is not supported in promises', t => {
170
165
171
166
const request = client . search ( {
172
167
index : 'test' ,
173
- type : 'doc' ,
174
168
q : 'foo:bar'
175
169
} )
176
170
@@ -200,7 +194,6 @@ test('Basic (options and callback)', t => {
200
194
201
195
client . search ( {
202
196
index : 'test' ,
203
- type : 'doc' ,
204
197
q : 'foo:bar'
205
198
} , {
206
199
requestTimeout : 10000
@@ -228,7 +221,6 @@ test('Basic (options and promises)', t => {
228
221
client
229
222
. search ( {
230
223
index : 'test' ,
231
- type : 'doc' ,
232
224
q : 'foo:bar'
233
225
} , {
234
226
requestTimeout : 10000
@@ -245,7 +237,7 @@ test('Pass unknown parameters as query parameters (and get a warning)', t => {
245
237
t . plan ( 4 )
246
238
247
239
function handler ( req , res ) {
248
- t . strictEqual ( req . url , '/test/doc/ _search?q=foo%3Abar&winter=is%20coming' )
240
+ t . strictEqual ( req . url , '/test/_search?q=foo%3Abar&winter=is%20coming' )
249
241
res . setHeader ( 'Content-Type' , 'application/json;utf=8' )
250
242
res . end ( JSON . stringify ( { hello : 'world' } ) )
251
243
}
@@ -257,7 +249,6 @@ test('Pass unknown parameters as query parameters (and get a warning)', t => {
257
249
258
250
client . search ( {
259
251
index : 'test' ,
260
- type : 'doc' ,
261
252
q : 'foo:bar' ,
262
253
winter : 'is coming'
263
254
} , ( err , { body, warnings } ) => {
@@ -273,7 +264,7 @@ test('If the API uses the same key for both url and query parameter, the url sho
273
264
t . plan ( 2 )
274
265
275
266
function handler ( req , res ) {
276
- t . strictEqual ( req . url , '/index/type/ _bulk' )
267
+ t . strictEqual ( req . url , '/index/_bulk' )
277
268
res . setHeader ( 'Content-Type' , 'application/json;utf=8' )
278
269
res . end ( JSON . stringify ( { hello : 'world' } ) )
279
270
}
@@ -286,7 +277,6 @@ test('If the API uses the same key for both url and query parameter, the url sho
286
277
// bulk has two `type` parameters
287
278
client . bulk ( {
288
279
index : 'index' ,
289
- type : 'type' ,
290
280
body : [ ]
291
281
} , ( err , { body, warnings } ) => {
292
282
t . error ( err )
0 commit comments