<commit_before>#!/usr/bin/env bash

echo 'creating dig-users index ...'
curl -XPUT localhost:9200/dig-users -d '
{
  "mappings" : {
    "user": {
      "properties": {
        "username": {
          "type": "string",
          "index": "not_analyzed"
        },
        "emailAddress": {
          "type": "string",
          "index": "not_analyzed"
        },
        "advancedSearch": {
          "type": "boolean"
        },
        "blurImages": {
          "type": "boolean"
        },
        "notificationFrequency": {
          "type": "string",
          "index": "not_analyzed"
        },
        "defaultSort": {
          "type": "string"
        },
        "savedQueries": {
          "properties": {
            "name": {
              "type": "string",
              "index": "not_analyzed"
            },
            "digUIState": {
              "properties" :{
                "searchText": {
                  "type": "string"
                },
                "facets": {
                  "type": "string"
                }
              }
            },
            "esState": {
              "properties" : {
                "query": {
                  "type": "string"
                },
                "filter": {
                  "type": "string"
                }
              }
            },
            "createdBy": {
              "type": "string",
              "index": "not_analyzed"
            },
            "createdAt": {
              "type": "date",
              "format" : "dateOptionalTime"
            },
            "lastRunDate": {
              "type": "date",
              "format" : "dateOptionalTime"
            },
            "notificationDate": {
              "type": "date",
              "format" : "dateOptionalTime"
            },
            "notificationHasRun": {
              "type": "boolean"
            },
            "sendEmailNotification": {
              "type": "boolean"
            }
          }
        },
        "receivedQueries": {
          "properties": {
            "name": {
              "type": "string",
              "index": "not_analyzed"
            },
            "digUIState": {
              "properties" :{
                "searchText": {
                  "type": "string"
                },
                "facets": {
                  "type": "string"
                }
              }
            },
            "esState": {
              "properties" : {
                "query": {
                  "type": "string"
                },
                "filter": {
                  "type": "string"
                }
              }
            },
            "createdBy": {
              "type": "string",
              "index": "not_analyzed"
            },
            "createdAt": {
              "type": "date",
              "format" : "dateOptionalTime"
            }
          }
        },
        "dateCreated": {
          "type": "date",
          "format" : "dateOptionalTime"
        }
      }<commit_msg>Adding search type to dig-users mapping.<commit_after>#!/usr/bin/env bash

echo 'creating dig-users index ...'
curl -XPUT localhost:9200/dig-users -d '
{
  "mappings" : {
    "user": {
      "properties": {
        "username": {
          "type": "string",
          "index": "not_analyzed"
        },
        "emailAddress": {
          "type": "string",
          "index": "not_analyzed"
        },
        "advancedSearch": {
          "type": "boolean"
        },
        "blurImages": {
          "type": "boolean"
        },
        "notificationFrequency": {
          "type": "string",
          "index": "not_analyzed"
        },
        "defaultSort": {
          "type": "string"
        },
        "savedQueries": {
          "properties": {
            "name": {
              "type": "string",
              "index": "not_analyzed"
            },
            "digUIState": {
              "properties" :{
                "searchText": {
                  "type": "string"
                },
                "facets": {
                  "type": "string"
                }
              }
            },
            "esState": {
              "properties" : {
                "query": {
                  "type": "string"
                },
                "filter": {
                  "type": "string"
                }
              }
            },
            "createdBy": {
              "type": "string",
              "index": "not_analyzed"
            },
            "createdAt": {
              "type": "date",
              "format" : "dateOptionalTime"
            },
            "lastRunDate": {
              "type": "date",
              "format" : "dateOptionalTime"
            },
            "notificationDate": {
              "type": "date",
              "format" : "dateOptionalTime"
            },
            "notificationHasRun": {
              "type": "boolean"
            },
            "sendEmailNotification": {
              "type": "boolean"
            }
          }
        },
        "receivedQueries": {
          "properties": {
            "name": {
              "type": "string",
              "index": "not_analyzed"
            },
            "digUIState": {
              "properties" :{
                "searchType": {
                  "type": "string"
                },
                "searchText": {
                  "type": "string"
                },
                "facets": {
                  "type": "string"
                }
              }
            },
            "esState": {
              "properties" : {
                "esType": {
                  "type": "string"
                },
                "query": {
                  "type": "string"
                },
                "filter": {
                  "type": "string"
                }
              }
            },
            "createdBy": {
              "type": "string",
              "index": "not_analyzed"
            },
            "createdAt": {
              "type": "date",
              "format" : "dateOptionalTime"
            }
          }
        },
        "dateCreated": {
          "type": "date",
          "format" : "dateOptionalTime"
        }
      }
{'fraction_non_alphanumeric': 0.14480217843985263, 'fraction_numerical': 0.0012814352074323242, 'mean_word_length': 0.8418879056047197, 'pattern_counts': {'":': 138, '<': 3, '<?xml version=': 0, '>': 3, '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': '1757426', 'n_tokens_mistral': 1657, 'n_tokens_neox': 1580, 'n_words': 259}