@@ -300,7 +300,8 @@ public function processDeleteAll($wheres, $options = [])
300300 'id ' => $ wheres ['_id ' ],
301301 ];
302302 try {
303- $ response = $ this ->client ->delete ($ params );
303+ $ responseObject = $ this ->client ->delete ($ params );
304+ $ response = $ responseObject ->asArray ();
304305 $ response ['deleteCount ' ] = $ response ['result ' ] === 'deleted ' ? 1 : 0 ;
305306
306307 return $ this ->_return ($ response ['deleteCount ' ], $ response , $ params , $ this ->_queryTag (__FUNCTION__ ));
@@ -310,7 +311,8 @@ public function processDeleteAll($wheres, $options = [])
310311 }
311312 try {
312313 $ params = $ this ->buildParams ($ this ->index , $ wheres , $ options );
313- $ response = $ this ->client ->deleteByQuery ($ params );
314+ $ responseObject = $ this ->client ->deleteByQuery ($ params );
315+ $ response = $ responseObject ->asArray ();
314316 $ response ['deleteCount ' ] = $ response ['deleted ' ] ?? 0 ;
315317
316318 return $ this ->_return ($ response ['deleteCount ' ], $ response , $ params , $ this ->_queryTag (__FUNCTION__ ));
@@ -365,11 +367,11 @@ public function processIndexMappings($index)
365367 {
366368 $ params = ['index ' => $ index ];
367369 try {
368- $ response = $ this ->client ->indices ()->getMapping ($ params );
369-
370+ $ responseObject = $ this ->client ->indices ()->getMapping ($ params );
371+ $ response = $ responseObject -> asArray ();
370372 $ result = $ this ->_return ($ response , $ response , $ params , $ this ->_queryTag (__FUNCTION__ ));
371373
372- return $ result ->data -> asArray () ;
374+ return $ result ->data ;
373375 } catch (Exception $ e ) {
374376 $ result = $ this ->_returnError ($ e ->getMessage (), $ e ->getCode (), $ params , $ this ->_queryTag (__FUNCTION__ ));
375377 throw new Exception ($ result ->errorMessage );
@@ -383,10 +385,11 @@ public function processIndexSettings($index)
383385 {
384386 $ params = ['index ' => $ index ];
385387 try {
386- $ response = $ this ->client ->indices ()->getSettings ($ params );
388+ $ responseObject = $ this ->client ->indices ()->getSettings ($ params );
389+ $ response = $ responseObject ->asArray ();
387390 $ result = $ this ->_return ($ response , $ response , $ params , $ this ->_queryTag (__FUNCTION__ ));
388391
389- return $ result ->data -> asArray () ;
392+ return $ result ->data ;
390393 } catch (Exception $ e ) {
391394 $ result = $ this ->_returnError ($ e ->getMessage (), $ e ->getCode (), $ params , $ this ->_queryTag (__FUNCTION__ ));
392395 throw new Exception ($ result ->errorMessage );
0 commit comments