CodeExplorer buildSearchQuery example
$search =
new EsSearch();
if ($criteria->offset
) { $search->
setFrom($criteria->offset
);
} if ($criteria->limit
) { $search->
setSize($criteria->limit
);
} if ($criteria->term
) { $search->
addQuery($this->
buildSearchQuery($criteria));
} if (!
empty($criteria->conditions
)) { $this->
addFilters($search,
$criteria);
} if (!
empty($criteria->sortings
)) { $this->
addSortings($criteria,
$search);
} return $search;
}