def apply_boosts(searcher):
    """Returns searcher with boosts applied"""
    return searcher.boost(
        question_title=4.0,
        question_content=3.0,
        question_answer_content=3.0,
        post_title=2.0,
        post_content=1.0,
        document_title=6.0,
        document_content=1.0,
        document_keywords=8.0,
        document_summary=2.0,

        # Text phrases in document titles and content get an extra boost.
        document_title__match_phrase=10.0,
        document_content__match_phrase=8.0)