@classmethod
def process_keyword_query_filter(cls, query, search_params):
    """Update query dict for given keyword.

    query: dict
    search_params: dict

    return tuple (query dict, keyword_query)
    """
    keyword_query = None
    if search_params.get('keyword'):
        keyword_query = cls._process_keyword(search_params.get('keyword'))
    if keyword_query:
        if not query.get('bool'):
            query['bool'] = {'must': []}
        if not query['bool'].get('must'):
            query['bool']['must'] = []
        must_or_should = 'must' if 'must' in keyword_query['bool'
            ] else 'should'
        query['bool']['must'].append({'bool': {must_or_should:
            keyword_query['bool'][must_or_should]}})
    return query, keyword_query
