The validators property

The validators property is an array of Koncorde filters. Each filter has to match in order for the document to be valid.

Structure

Copied to clipboard!
{
  "myIndex": {
    "myCollection": {
      "strict": true,
      "fields": {
        "..."
      },
      "validators": [
        { "equals": { "fieldName": "maximilian"} },
        {
          "bool": {
            "must": [
              "..."
            ],
            "must_not": [
              "..."
            ],
            "should": [
              "..."
            ],
            "should_not": [
              "..."
            ]
          }
        },
        "..."
      ]
    },
    "..."
  },
  "..."
}

Translates to the following Koncorde query:

Copied to clipboard!
{
  "bool": {
    "must": [
      { "equals": { "fieldName": "maximilian" } },
      {
        "bool": {
          "must": ["..."],
          "must_not": ["..."],
          "should": ["..."],
          "should_not": ["..."]
        }
      },
      "..."
    ]
  }
}