original_string: protected function __mfind($index, $type, $ids) {
          try {
              $docs = $this->client->mget([
                  'index' => $index,
                  'type' => $type,
                  'body' => [
                      "ids" => $ids
                  ]
              ]);
              $result = ['ids' => $ids, 'found' => [], 'missed' => [], 'docs' => []];
              $missed = [] + $ids;
              foreach ($docs['docs'] as $doc) {
                  if ($doc['found']) {
                      $result['docs'][] = $doc;
                      $result['found'][] = $doc['_id'];
                      unset($missed[array_search($doc['_id'], $missed)]);
                  }
              }
              $result['missed'] = $missed;
              return $this->_makeMultiGetResult($result);
          } catch (\Exception $e) {
              trigger_error($e->getMessage(), E_USER_WARNING);
              return null;
          }
      }
code: protected function __mfind($index, $type, $ids) {
          try {
              $docs = $this->client->mget([
                  'index' => $index,
                  'type' => $type,
                  'body' => [
                      "ids" => $ids
                  ]
              ]);
              $result = ['ids' => $ids, 'found' => [], 'missed' => [], 'docs' => []];
              $missed = [] + $ids;
              foreach ($docs['docs'] as $doc) {
                  if ($doc['found']) {
                      $result['docs'][] = $doc;
                      $result['found'][] = $doc['_id'];
                      unset($missed[array_search($doc['_id'], $missed)]);
                  }
              }
              $result['missed'] = $missed;
              return $this->_makeMultiGetResult($result);
          } catch (\Exception $e) {
              trigger_error($e->getMessage(), E_USER_WARNING);
              return null;
          }
      }
code_tokens: protected function __mfind ( $ index , $ type , $ ids ) { try { $ docs = $ this -> client -> mget ( [ 'index' => $ index , 'type' => $ type , 'body' => [ "ids" => $ ids ] ] ) ; $ result = [ 'ids' => $ ids , 'found' => [ ] , 'missed' => [ ] , 'docs' => [ ] ] ; $ missed = [ ] + $ ids ; foreach ( $ docs [ 'docs' ] as $ doc ) { if ( $ doc [ 'found' ] ) { $ result [ 'docs' ] [ ] = $ doc ; $ result [ 'found' ] [ ] = $ doc [ '_id' ] ; unset ( $ missed [ array_search ( $ doc [ '_id' ] , $ missed ) ] ) ; } } $ result [ 'missed' ] = $ missed ; return $ this -> _makeMultiGetResult ( $ result ) ; } catch ( \ Exception $ e ) { trigger_error ( $ e -> getMessage ( ) , E_USER_WARNING ) ; return null ; } }
docstring: The actual method to call client's mget method.
  Returns either a result of Model objects or null on failure.
  
  @param string $index
  @param string $type
  @param sring[]|int[] $ids
  @return null|Model
docstring_tokens: The actual method to call client s mget method . Returns either a result of Model objects or null on failure .