<commit_before>#!/bin/bash

if [ "$#" -ne 2 ]; then
    echo "Illegal number of parameters, Usage :- ./local_es_setup.sh <es_host_ip> <es_table_name_prefix_for_index>"
   exit 1
fi

curl -H 'Content-type: application/json' -XPUT ${1}:9200/_template/template_foxtrot_mappings -d '
{
  "template": "'${2}'-*",
  "settings": {
    "number_of_shards": 2,
    "number_of_replicas": 1,
    "index.mapping.total_fields.limit": 3000
  },
  "mappings": {
    "document": {
      "_source": {
        "enabled": false
      },
      "_all": {
        "enabled": false
      },
      "dynamic_templates": [
        {
          "template_metadata_timestamp": {
            "match": "__FOXTROT_METADATA__.time",
            "mapping": {
              "store": true,
              "index": "true",
              "type": "date"
            }
          }
        },
       {
          "template_metadata_string": {
            "match": "__FOXTROT_METADATA__.*",
            "match_mapping_type": "string",
            "mapping": {
              "store": true,
              "index": "true",<commit_msg>Increaed number of fields to 5000<commit_after>#!/bin/bash

if [ "$#" -ne 2 ]; then
    echo "Illegal number of parameters, Usage :- ./local_es_setup.sh <es_host_ip> <es_table_name_prefix_for_index>"
   exit 1
fi

curl -H 'Content-type: application/json' -XPUT ${1}:9200/_template/template_foxtrot_mappings -d '
{
  "template": "'${2}'-*",
  "settings": {
    "number_of_shards": 2,
    "number_of_replicas": 1,
    "mapping.total_fields.limit": 5000
  },
  "mappings": {
    "document": {
      "_source": {
        "enabled": false
      },
      "_all": {
        "enabled": false
      },
      "dynamic_templates": [
        {
          "template_metadata_timestamp": {
            "match": "__FOXTROT_METADATA__.time",
            "mapping": {
              "store": true,
              "index": "true",
              "type": "date"
            }
          }
        },
       {
          "template_metadata_string": {
            "match": "__FOXTROT_METADATA__.*",
            "match_mapping_type": "string",
            "mapping": {
              "store": true,
              "index": "true",
{'fraction_non_alphanumeric': 0.1587374199451052, 'fraction_numerical': 0.01463860933211345, 'mean_word_length': 1.8663171690694627, 'pattern_counts': {'":': 48, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3796614', 'n_tokens_mistral': 747, 'n_tokens_neox': 709, 'n_words': 128}