<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 -XPUT ${1}:9200/_template/template_foxtrot_mappings -d '
{
    "template" : "${2}-*",
    "settings" : {
        "number_of_shards" : 10,
        "number_of_replicas" : 0
    },
    "mappings" : {
        "document" : {
            "_source" : { "enabled" : false },
            "_all" : { "enabled" : false },
            "_timestamp" : { "enabled" : true },

            "dynamic_templates" : [
                {
                    "template_timestamp" : {
                        "match" : "timestamp",
                        "mapping" : {
                            "store" : false,
                            "index" : "not_analyzed",
                            "type" : "date"
                        }
                    }
                },
                {
                    "template_no_store_analyzed" : {
                        "match" : "*",
                        "match_mapping_type" : "string",
                        "mapping" : {
                            "store" : false,
                            "index" : "not_analyzed",
                            "fielddata": {<commit_msg>Single quote was missing as outer request was inside single quote. Issue pointed out by vivek was because of this.<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 -XPUT ${1}:9200/_template/template_foxtrot_mappings -d '
{
    "template" : "'${2}'-*",
    "settings" : {
        "number_of_shards" : 10,
        "number_of_replicas" : 0
    },
    "mappings" : {
        "document" : {
            "_source" : { "enabled" : false },
            "_all" : { "enabled" : false },
            "_timestamp" : { "enabled" : true },

            "dynamic_templates" : [
                {
                    "template_timestamp" : {
                        "match" : "timestamp",
                        "mapping" : {
                            "store" : false,
                            "index" : "not_analyzed",
                            "type" : "date"
                        }
                    }
                },
                {
                    "template_no_store_analyzed" : {
                        "match" : "*",
                        "match_mapping_type" : "string",
                        "mapping" : {
                            "store" : false,
                            "index" : "not_analyzed",
                            "fielddata": {
{'fraction_non_alphanumeric': 0.12726600073991862, 'fraction_numerical': 0.008139104698483167, 'mean_word_length': 1.0704441041347625, 'pattern_counts': {'":': 2, '<': 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': '5363761', 'n_tokens_mistral': 779, 'n_tokens_neox': 727, 'n_words': 139}