/**
* @return QueryBuilder
*/
private function buildQuery(Criteria
$criteria) { $query =
new QueryBuilder($this->connection
);
$query->
from('s_customer_search_index', 'customer'
);
$query->
leftJoin('customer', 's_user_attributes', 'customerAttribute', 'customerAttribute.userID = customer.id'
);
foreach ($criteria->
getConditions() as $condition) { $handler =
$this->handlerRegistry->
getConditionHandler($condition);
$handler->
handle($condition,
$query);
} return $query;
} /**
* @return array[]
*/
private function fetchCustomers(Criteria
$criteria, QueryBuilder
$query) {