docstr: Mappings config for keyword field
docstr_tok: ["Mappings","config","for","keyword","field"]
code: def keyword_field(
      enable_text_search: bool = False,
  ):
      """Mappings config for keyword field"""
      mapping = {
          "type": "keyword",
      }
      if enable_text_search:
          text_field = mappings.text_field(with_wordcloud=False)
          text_field_fields = text_field.pop("fields", {})
          mapping["fields"] = {"text": text_field, **text_field_fields}
      return mapping
  
file_path: argilla/src/argilla/server/daos/backend/mappings/helpers.py
imports: from typing import Any, Dict, List
  from argilla.server.daos.backend.mappings.stopwords import english
  from argilla.server.settings import settings
label_desc: Use image node_id 1 for calling the mappings obj's underlying member method code with example usage: obj.keyword_field(enable_text_search) and returns: mapping