{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--mongodb-atlas-searchindex.json",
  "title": "MongoDBAtlasSearchIndexProperties",
  "description": "Returns, adds, edits, and removes Atlas Search indexes. Also returns and updates user-defined analyzers.. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/mongodb-atlas-searchindex.json",
    "sourceSha256": "7b3737a7e8b761d675784ad0793502cf525a875739b96510ba45a0e7fd596694"
  },
  "type": "object",
  "properties": {
    "Analyzer": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Specific pre-defined method chosen to convert database field text into searchable words. This conversion reduces the text of fields into the smallest units of text. These units are called a **term** or **token**. This process, known as tokenization, involves a variety of changes made to the text in fields:\n\n- extracting words\n- removing punctuation\n- removing accents\n- changing to lowercase\n- removing common words\n- reducing words to their root form (stemming)\n- changing words to their base form (lemmatization)\n MongoDB Cloud uses the selected process to build the Atlas Search index."
    },
    "Analyzers": {
      "insertionOrder": false,
      "type": "array",
      "description": "List of user-defined methods to convert database field text into searchable words.",
      "items": {
        "$ref": "#/$defs/ApiAtlasFTSAnalyzersViewManual",
        "type": "object"
      }
    },
    "Profile": {
      "oneOf": [
        {
          "type": "string",
          "default": "default"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The profile is defined in AWS Secret manager. See [Secret Manager Profile setup](../../../examples/profile-secret.yaml)."
    },
    "ClusterName": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 64,
          "minLength": 1,
          "pattern": "^([a-zA-Z0-9]([a-zA-Z0-9-]){0,21}(?<!-)([\\w]{0,42}))$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Name of the cluster that contains the database and collection with one or more Application Search indexes."
    },
    "CollectionName": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Human-readable label that identifies the collection that contains one or more Atlas Search indexes."
    },
    "Database": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Human-readable label that identifies the database that contains the collection with one or more Atlas Search indexes."
    },
    "ProjectId": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 24,
          "minLength": 24,
          "pattern": "^([a-f0-9]{24})$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Unique 24-hexadecimal digit string that identifies your project."
    },
    "Mappings": {
      "type": "object",
      "description": "Index specifications for the collection's fields.",
      "$ref": "#/$defs/ApiAtlasFTSMappingsViewManual"
    },
    "Name": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Human-readable label that identifies this index. Within each namespace, names of all indexes in the namespace must be unique."
    },
    "SearchAnalyzer": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Method applied to identify words when searching this index."
    },
    "Synonyms": {
      "type": "array",
      "insertionOrder": false,
      "description": "Rule sets that map words to their synonyms in this index.",
      "items": {
        "$ref": "#/$defs/ApiAtlasFTSSynonymMappingDefinitionView",
        "type": "object"
      }
    }
  },
  "typeName": "MongoDB::Atlas::SearchIndex",
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
  "$defs": {
    "ApiAtlasFTSAnalyzersViewManual": {
      "type": "object",
      "properties": {
        "CharFilters": {
          "type": "array",
          "insertionOrder": false,
          "description": "Filters that examine text one character at a time and perform filtering operations.",
          "items": {
            "type": "object"
          }
        },
        "Name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Human-readable name that identifies the custom analyzer. Names must be unique within an index, and must not start with any of the following strings:\n- `lucene.`\n- `builtin.`\n- `mongodb.`"
        },
        "TokenFilters": {
          "type": "array",
          "insertionOrder": false,
          "description": "Filter that performs operations such as:\n\n- Stemming, which reduces related words, such as \"talking\", \"talked\", and \"talks\" to their root word \"talk\".\n\n- Redaction, the removal of sensitive information from public documents.",
          "items": {}
        },
        "Tokenizer": {
          "type": "object",
          "description": "Tokenizer that you want to use to create tokens. Tokens determine how Atlas Search splits up text into discrete chunks for indexing."
        }
      },
      "title": "MongoDBAtlasSearchIndexApiAtlasFTSAnalyzersViewManualDefinition",
      "additionalProperties": false
    },
    "ApiAtlasFTSMappingsViewManual": {
      "type": "object",
      "properties": {
        "Dynamic": {
          "type": "boolean",
          "description": "Flag that indicates whether the index uses dynamic or static mappings. Required if **mappings.fields** is omitted."
        },
        "Fields": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "One or more field specifications for the Atlas Search index. The element of the array must have the format fieldName:fieldType. Required if **mappings.dynamic** is omitted or set to **false**."
        }
      },
      "title": "MongoDBAtlasSearchIndexApiAtlasFTSMappingsViewManualDefinition",
      "additionalProperties": false
    },
    "ApiAtlasFTSSynonymMappingDefinitionView": {
      "type": "object",
      "properties": {
        "Analyzer": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Specific pre-defined method chosen to apply to the synonyms to be searched."
        },
        "Name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Human-readable label that identifies the synonym definition. Each **synonym.name** must be unique within the same index definition."
        },
        "Source": {
          "type": "object",
          "description": "Data set that stores the mapping one or more words map to one or more synonyms of those words.",
          "$ref": "#/$defs/SynonymSource"
        }
      },
      "title": "MongoDBAtlasSearchIndexApiAtlasFTSSynonymMappingDefinitionViewDefinition",
      "additionalProperties": false
    },
    "SynonymSource": {
      "type": "object",
      "properties": {
        "Collection": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Human-readable label that identifies the MongoDB collection that stores words and their applicable synonyms."
        }
      },
      "title": "MongoDBAtlasSearchIndexSynonymSourceDefinition",
      "additionalProperties": false
    }
  },
  "additionalProperties": false,
  "createOnlyProperties": [
    "/properties/ProjectId",
    "/properties/Profile",
    "/properties/ClusterName",
    "/properties/CollectionName",
    "/properties/Database",
    "/properties/Mappings",
    "/properties/SearchAnalyzer"
  ],
  "readOnlyProperties": [
    "/properties/IndexId",
    "/properties/Status"
  ],
  "required": [
    "Mappings",
    "ClusterName",
    "CollectionName",
    "Database"
  ],
  "primaryIdentifier": [
    "/properties/IndexId",
    "/properties/Profile",
    "/properties/ProjectId",
    "/properties/ClusterName"
  ]
}
