Core
Guides v1.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

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 #

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

Translates to the following Koncorde query:

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