public function getByProductIds(array $productIds, $storeId)
    {
        $searchQueryTable = $this->getTable('search_query');
        $select = $this->getBaseSelect()
            ->joinInner($searchQueryTable, "main_table.query_id = {$searchQueryTable}.query_id", [])
            ->where('product_id IN(?)', $productIds)
            ->where('store_id = ?', $storeId)
            ->columns(['product_id', 'query_id', 'position', 'is_blacklisted']);

        return $this->getConnection()->fetchAll($select);
    }
public function getByProductIds(array $productIds, $storeId)
    {
        $searchQueryTable = $this->getTable('search_query');
        $select = $this->getBaseSelect()
            ->joinInner($searchQueryTable, "main_table.query_id = {$searchQueryTable}.query_id", [])
            ->where('product_id IN(?)', $productIds)
            ->where('store_id = ?', $storeId)
            ->columns(['product_id', 'query_id', 'position', 'is_blacklisted']);

        return $this->getConnection()->fetchAll($select);
    }
public function getByProductIds ( array $ productIds , $ storeId ) { $ searchQueryTable = $ this -> getTable ( 'search_query' ) ; $ select = $ this -> getBaseSelect ( ) -> joinInner ( $ searchQueryTable , "main_table.query_id = {$searchQueryTable}.query_id" , [ ] ) -> where ( 'product_id IN(?)' , $ productIds ) -> where ( 'store_id = ?' , $ storeId ) -> columns ( [ 'product_id' , 'query_id' , 'position' , 'is_blacklisted' ] ) ; return $ this -> getConnection ( ) -> fetchAll ( $ select ) ; }
Get query position for a product list.

@param array $productIds Product ids.
@param int   $storeId    Store ids.

@return array
Get query position for a product list .