@action_logging
def _search_table(*, search_term: str, page_index: int, filters: Dict, search_type: str) -> Dict[(str, Any)]:
    "\n    Call the search service endpoint and return matching results\n    Search service logic defined here:\n    https://github.com/lyft/amundsensearchlibrary/blob/master/search_service/api/table.py\n\n    :return: a json output containing search results array as 'results'\n    "
    tables = {'page_index': int(page_index), 'results': [], 'total_results': 0}
    results_dict = {'search_term': search_term, 'msg': '', 'tables': tables}
    try:
        if has_filters(filters=filters):
            query_json = generate_query_json(filters=filters, page_index=page_index, search_term=search_term)
            url_base = (app.config['SEARCHSERVICE_BASE'] + SEARCH_TABLE_FILTER_ENDPOINT)
            response = request_search(url=url_base, headers={'Content-Type': 'application/json'}, method='POST', data=json.dumps(query_json))
        else:
            url_base = (app.config['SEARCHSERVICE_BASE'] + SEARCH_TABLE_ENDPOINT)
            url = f'{url_base}?query_term={search_term}&page_index={page_index}'
            response = request_search(url=url)
        status_code = response.status_code
        if (status_code == HTTPStatus.OK):
            results_dict['msg'] = 'Success'
            results = response.json().get('results')
            tables['results'] = [map_table_result(result) for result in results]
            tables['total_results'] = response.json().get('total_results')
        else:
            message = 'Encountered error: Search request failed'
            results_dict['msg'] = message
            logging.error(message)
        results_dict['status_code'] = status_code
        return results_dict
    except Exception as e:
        message = ('Encountered exception: ' + str(e))
        results_dict['msg'] = message
        logging.exception(message)
        return results_dict
Call the search service endpoint and return matching results
Search service logic defined here:
https://github.com/lyft/amundsensearchlibrary/blob/master/search_service/api/table.py

:return: a json output containing search results array as 'results'
@action_logging
def _search_table(*, search_term: str, page_index: int, filters: Dict, search_type: str) -> Dict[(str, Any)]:
    "\n    Call the search service endpoint and return matching results\n    Search service logic defined here:\n    https://github.com/lyft/amundsensearchlibrary/blob/master/search_service/api/table.py\n\n    :return: a json output containing search results array as 'results'\n    "
    tables = {'page_index': int(page_index), 'results': [], 'total_results': 0}
    results_dict = {'search_term': search_term, 'msg': , 'tables': tables}
    try:
        if has_filters(filters=filters):
            query_json = generate_query_json(filters=filters, page_index=page_index, search_term=search_term)
            url_base = (app.config['SEARCHSERVICE_BASE'] + SEARCH_TABLE_FILTER_ENDPOINT)
            response = request_search(url=url_base, headers={'Content-Type': 'application/json'}, method='POST', data=json.dumps(query_json))
        else:
            url_base = (app.config['SEARCHSERVICE_BASE'] + SEARCH_TABLE_ENDPOINT)
            url = f'{url_base}?query_term={search_term}&page_index={page_index}'
            response = request_search(url=url)
        status_code = response.status_code
        if (status_code == HTTPStatus.OK):
            results_dict['msg'] = 'Success'
            results = response.json().get('results')
            tables['results'] = [map_table_result(result) for result in results]
            tables['total_results'] = response.json().get('total_results')
        else:
            message = 'Encountered error: Search request failed'
            results_dict['msg'] = message
            logging.error(message)
        results_dict['status_code'] = status_code
        return results_dict
    except Exception as e:
        message = ('Encountered exception: ' + str(e))
        results_dict['msg'] = message
        logging.exception(message)
        return results_dict