def _get_stripped_keywords(keywords: str) -> str:
    """Returns a valid database search keywords string.

    Args:
        keywords: The search keywords.

    Returns:
        A valid database search keywords string.
    """
    keywords = " ".join(keywords.split())
    keywords = keywords.replace(" ", ":* & ") + ":*"
    return keywords