Execute a search and return the results, up to the ``SEARCH_LIMIT``.

        Uses the query currently in this SearchHelper.

        Arguments:
            limit (int): Maximum number of entries to return. **Default**: ``10`` for basic
                queries, and ``10000`` for advanced.
            info (bool): If ``False``, search will return a list of the results.
                    If ``True``, search will return a tuple containing the results list
                    and other information about the query.
                    **Default:** ``False``.
            retries (int): The number of times to retry a Search query if it fails.
                           **Default:** 3.

        Returns:
            If ``info`` is ``False``, *list*: The search results.
            If ``info`` is ``True``, *tuple*: The search results,
            and a dictionary of query information.

def _ex_search(self, limit=None, info=False, retries=3):
        """Execute a search and return the results, up to the ``SEARCH_LIMIT``.

        Uses the query currently in this SearchHelper.

        Arguments:
            limit (int): Maximum number of entries to return. **Default**: ``10`` for basic
                queries, and ``10000`` for advanced.
            info (bool): If ``False``, search will return a list of the results.
                    If ``True``, search will return a tuple containing the results list
                    and other information about the query.
                    **Default:** ``False``.
            retries (int): The number of times to retry a Search query if it fails.
                           **Default:** 3.

        Returns:
            If ``info`` is ``False``, *list*: The search results.
            If ``info`` is ``True``, *tuple*: The search results,
            and a dictionary of query information.
        """
        # Make sure there is query information present
        if not self.initialized:
            raise ValueError('No query has been set.')

        # Create Search-ready query
        if limit is not None:
            self.__query["limit"] = limit
        query = _validate_query(self.__query)

        tries = 0
        errors = []
        while True:
            # Try searching until success or `retries` number of failures
            # Raise exception after `retries` failures
            try:
                search_res = self.__search_client.post_search(self.index, query)
            except globus_sdk.SearchAPIError as e:
                if tries >= retries:
                    raise
                else:
                    errors.append(repr(e))
            except Exception as e:
                if tries >= retries:
                    raise
                else:
                    errors.append(repr(e))
            else:
                break
            tries += 1

        # Remove the wrapping on each entry from Globus search
        res = mdf_toolbox.gmeta_pop(search_res, info=info)

        # Add more information to output if requested
        if info:
            # Add everything from the query itself
            info_dict = mdf_toolbox.dict_merge(res[1], query)
            # But rename "q" to "query" for clarity
            info_dict["query"] = info_dict.pop("q")
            # Add other useful/interesting parameters
            info_dict["index_uuid"] = self.index
            info_dict["retries"] = tries
            info_dict["errors"] = errors
            # Remake tuple because tuples don't suport assignment
            res = (res[0], info_dict)
        return res