def METHOD_NAME(self):
    """
    Returns an Elasticsearch DSL search object or an iterator.
    .. note::
       Calling ``list(search)`` over an DSL search object is the same as
       calling ``search.execute().hits``. This is why an DSL search object
       is compatible with DRF's paginator.
    """
    use_advanced_query = should_use_advanced_query(self._get_projects_to_search())
    search = self._search_executor.search(
        use_advanced_query=use_advanced_query,
        aggregate_results=False,
    )
    if not search:
        return []
    return search