/** * @param \Elastica\Search $search * @return array */ protected function _getSearchDataHeader(BaseSearch $search) { $header = $search->getOptions(); if ($search->hasIndices()) { $header['index'] = $search->getIndices(); } if ($search->hasTypes()) { $header['types'] = $search->getTypes(); } return $header; }
/** * @param \Elastica\Search $search * * @return array */ protected function _getSearchDataHeader(BaseSearch $search) { $header = $search->getOptions(); if ($search->hasIndices()) { $header['index'] = $search->getIndices(); } if ($search->hasTypes()) { $header['types'] = $search->getTypes(); } // Filter options accepted in the "header" return array_intersect_key($header, array_flip(self::$HEADER_OPTIONS)); }