{
  "$schema" : "https://json-schema.org/draft/2019-09/schema",
  "$defs" : {
    "BundledServer" : {
      "type" : "object",
      "properties" : {
        "DataPath" : {
          "type" : "string",
          "description" : "Path to the directory where the bundled search engine server stores data.\nIt is recommended to configure a data directory that is located outside of\nthe Engine installation directory to ease the Engine migration to newer versions.\n[restart required]",
          "default" : "data/_/opensearch"
        },
        "LogPath" : {
          "type" : "string",
          "description" : "Path to the directory where the bundled search engine should log.\n[restart required]",
          "default" : "logs/opensearch"
        },
        "ClusterName" : {
          "type" : "string",
          "description" : "Name of the cluster of the bundled search engine server.\n[restart required]",
          "default" : "ivy-opensearch-{uid}"
        },
        "Port" : {
          "type" : "string",
          "description" : "Port to communicate with bundled search engine server\n  AUTO: A free port in port range 19200-19299 is searched automatically.\n  <integer>: A fixed port number that you define. We recommend to use a number > 10000.\n             Make sure it is free.\n[restart required]",
          "default" : "AUTO"
        }
      },
      "additionalProperties" : false
    },
    "Client" : {
      "type" : "object",
      "properties" : {
        "ConnectTimeout" : {
          "type" : "integer",
          "description" : "Maximum seconds to wait until a connection to the search engine can be established.\n[restart required]",
          "default" : "10"
        },
        "ReadTimeout" : {
          "type" : "integer",
          "description" : "Maximum seconds to wait for data to be sent by search engine.\nRaise this value if large datasets are expected.\n[restart required]",
          "default" : "30"
        }
      },
      "additionalProperties" : false
    },
    "ExternalServer" : {
      "type" : "object",
      "properties" : {
        "Url" : {
          "type" : "string",
          "description" : "Configure the URL of your own OpenSearch server if you want to use it instead of the bundled server.\n[restart required]"
        },
        "UserName" : {
          "type" : "string",
          "description" : "Name of the user to use to authenticate in the external OpenSearch server"
        },
        "Password" : {
          "description" : "Password of the user to use to authenticate in the external OpenSearch server.",
          "format" : "password",
          "additionalProperties" : false,
          "type" : "string",
          "examples" : [ "\"${encrypt:}\"" ]
        }
      },
      "additionalProperties" : false
    },
    "Index" : {
      "type" : "object",
      "properties" : {
        "NamePrefix" : {
          "type" : "string",
          "description" : "The name prefix for the indexes.\nIf multiple Ivy Engines use the same OpenSearch server instance, you need to define unique NamePrefixes per engine.\nYou might add the engine host name as part of the name prefix, i.e. 'servername'\n[restart required]",
          "default" : "ivy"
        },
        "Reindex" : {
          "$ref" : "#/$defs/Reindex"
        },
        "TotalFieldsLimit" : {
          "type" : "integer",
          "description" : "If BusinessData are not well modeled for OpenSearch, you may have to increase the 'total_fields.limit' of the mapping.\nPerformance may decrease. If you change this setting, you need to reindex all business data in Engine Cockpit.\n[restart required]",
          "default" : "4000"
        }
      },
      "additionalProperties" : false
    },
    "Reindex" : {
      "type" : "object",
      "properties" : {
        "QueueSize" : {
          "type" : "integer",
          "description" : "The size of the queue that is used to store objects read from the database until they are written to the search engine\n[restart required]",
          "default" : "10000"
        },
        "ReadWindowSize" : {
          "type" : "integer",
          "description" : "The number of objects that Ivy reads in one batch from the system database.\n[restart required]",
          "default" : "1000"
        },
        "WriteWindowSize" : {
          "type" : "integer",
          "description" : "The number of objects that Ivy writes in one batch to the search engine.\n[restart required]",
          "default" : "1000"
        }
      },
      "additionalProperties" : false
    }
  },
  "type" : "object",
  "properties" : {
    "BundledServer" : {
      "$ref" : "#/$defs/BundledServer",
      "description" : "The bundled search engine server...\n- is started in a separate JVM.\n- reachable only on 'localhost' but the access is unprotected.\n- JVM arguments used to start the bundled search engine server can be configured in the '[ivyEngine]/configuration/opensearch/jvm.options' file.\n[restart required]"
    },
    "ExternalServer" : {
      "$ref" : "#/$defs/ExternalServer",
      "description" : "Configure access to your own search engine server if you want to use it instead of the bundled server.\n\nTo install your own search engine server follow these steps\nhttps://opensearch.org/docs/2.19/install-and-configure/install-opensearch/index/\n\nCurrently, Axon Ivy supports OpenSearch in version 2.19.\nIf your OpenSearch server is running on another host, the access to that instance has to be protected.\nYou can achieve that with a front-end webserver like NGINX that enforces basic authentication.\n[restart required]"
    },
    "Index" : {
      "$ref" : "#/$defs/Index",
      "description" : "Settings for the indexes that are created in the search engine."
    },
    "Client" : {
      "$ref" : "#/$defs/Client",
      "description" : "Configures the search engine client. The client is the ivy engine which communicates with the search engine."
    }
  },
  "additionalProperties" : false
}
