def METHOD_NAME(
    path: str,
    enable_text_search_in_keywords: bool = False,
):
    """Dynamic template mappings config for keyword field based on path match"""
    return {
        "path_match": path,
        "match_mapping_type": "string",
        "mapping": mappings.keyword_field(
            enable_text_search=enable_text_search_in_keywords,
        ),
    }