{
  "$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 Elasticsearch 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" : "elasticsearch/data"
        },
        "ClusterName" : {
          "type" : "string",
          "description" : "Name of the cluster of the bundled Elasticsearch server.\n[restart required]",
          "default" : "ivy-elasticsearch-{uid}"
        },
        "Port" : {
          "type" : "string",
          "description" : "Port to communicate with bundled Elasticsearch 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 Elasticsearch can be established.\n[restart required]",
          "default" : "10"
        },
        "ReadTimeout" : {
          "type" : "integer",
          "description" : "Maximum seconds to wait for data to be sent by Elasticsearch.\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 Elasticsearch 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 Elasticsearch server"
        },
        "Password" : {
          "description" : "Password of the user to use to authenticate in the external Elasticsearch server.\n[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 Elasticsearch 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 Elasticsearch, 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 Elasticsearch\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 Elasticsearch.\n[restart required]",
          "default" : "1000"
        }
      },
      "additionalProperties" : false
    }
  },
  "type" : "object",
  "properties" : {
    "BundledServer" : {
      "$ref" : "#/$defs/BundledServer",
      "description" : "The bundled Elasticsearch server...\n- is started in a separate JVM when a feature requires Elasticsearch.\n- reachable only on 'localhost' but the access is unprotected.\n- JVM arguments used to start the bundled Elasticsearch server can be configured in the 'elasticsearch/config/jvm.options' file.\n[restart required]"
    },
    "ExternalServer" : {
      "$ref" : "#/$defs/ExternalServer",
      "description" : "Configure access to your own Elasticsearch server if you want to use it instead of the bundled server.\n\nTo install your own Elasticsearch server follow these steps\nhttps://www.elastic.co/guide/en/elasticsearch/reference/7.17/setup.html\n\nCurrently, Axon Ivy supports Elasticsearch server versions in the 7.17.x range.\nIf your Elasticsearch 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 for Elasticsearch that enforces basic authentication.\n[restart required]"
    },
    "Index" : {
      "$ref" : "#/$defs/Index",
      "description" : "Settings for the indexes that are created in Elasticsearch."
    },
    "Client" : {
      "$ref" : "#/$defs/Client",
      "description" : "Configures the Elasticsearch client. The client is the ivy engine which communicates with Elasticsearch."
    }
  },
  "additionalProperties" : false
}
