public function getSessionData($storeId, $sessionIds)
    {
        $data = [];
        $searchRequest  = $this->getSearchRequest($storeId, $sessionIds);
        $searchResponse = $this->searchEngine->search($searchRequest);

        foreach ($searchResponse->getAggregations()->getBucket('session_id')->getValues() as $sessionValue) {
            $sessionData = $this->processSessionData($sessionValue);
            $sessionData['store_id'] = $storeId;
            unset($sessionData['count']);

            $data[] = array_filter($sessionData);
        }

        return $data;
    }
public function getSessionData($storeId, $sessionIds)
    {
        $data = [];
        $searchRequest  = $this->getSearchRequest($storeId, $sessionIds);
        $searchResponse = $this->searchEngine->search($searchRequest);

        foreach ($searchResponse->getAggregations()->getBucket('session_id')->getValues() as $sessionValue) {
            $sessionData = $this->processSessionData($sessionValue);
            $sessionData['store_id'] = $storeId;
            unset($sessionData['count']);

            $data[] = array_filter($sessionData);
        }

        return $data;
    }
public function getSessionData ( $ storeId , $ sessionIds ) { $ data = [ ] ; $ searchRequest = $ this -> getSearchRequest ( $ storeId , $ sessionIds ) ; $ searchResponse = $ this -> searchEngine -> search ( $ searchRequest ) ; foreach ( $ searchResponse -> getAggregations ( ) -> getBucket ( 'session_id' ) -> getValues ( ) as $ sessionValue ) { $ sessionData = $ this -> processSessionData ( $ sessionValue ) ; $ sessionData [ 'store_id' ] = $ storeId ; unset ( $ sessionData [ 'count' ] ) ; $ data [ ] = array_filter ( $ sessionData ) ; } return $ data ; }
Retrieve session data to be indexed.

@param int      $storeId    Store id.
@param string[] $sessionIds Session ids.

@return array
Retrieve session data to be indexed .