{
  "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
  "type" : "scalar",
  "name" : "kql",
  "description" : "Performs a KQL query. Returns true if the provided KQL query string matches the row.",
  "signatures" : [
    {
      "params" : [
        {
          "name" : "query",
          "type" : "keyword",
          "optional" : false,
          "description" : "Query string in KQL query string format."
        }
      ],
      "variadic" : false,
      "returnType" : "boolean"
    },
    {
      "params" : [
        {
          "name" : "query",
          "type" : "keyword",
          "optional" : false,
          "description" : "Query string in KQL query string format."
        },
        {
          "name" : "options",
          "type" : "function_named_parameters",
          "mapParams" : "{name='boost', values=[2.5], description='Floating point number used to decrease or increase the relevance scores of the query. Defaults to 1.0.', type=[float]}, {name='time_zone', values=[UTC, Europe/Paris, America/New_York], description='UTC offset or IANA time zone used to interpret date literals in the query string.', type=[keyword]}, {name='case_insensitive', values=[true, false], description='If true, performs case-insensitive matching for keyword fields. Defaults to false.', type=[boolean]}, {name='default_field', values=[*, logs.*, title], description='Default field to search if no field is provided in the query string. Supports wildcards (*).', type=[keyword]}",
          "optional" : true,
          "description" : "(Optional) KQL additional options as <<esql-function-named-params,function named parameters>>. Available in stack version 9.3.0 and later."
        }
      ],
      "variadic" : false,
      "returnType" : "boolean"
    },
    {
      "params" : [
        {
          "name" : "query",
          "type" : "text",
          "optional" : false,
          "description" : "Query string in KQL query string format."
        }
      ],
      "variadic" : false,
      "returnType" : "boolean"
    },
    {
      "params" : [
        {
          "name" : "query",
          "type" : "text",
          "optional" : false,
          "description" : "Query string in KQL query string format."
        },
        {
          "name" : "options",
          "type" : "function_named_parameters",
          "mapParams" : "{name='boost', values=[2.5], description='Floating point number used to decrease or increase the relevance scores of the query. Defaults to 1.0.', type=[float]}, {name='time_zone', values=[UTC, Europe/Paris, America/New_York], description='UTC offset or IANA time zone used to interpret date literals in the query string.', type=[keyword]}, {name='case_insensitive', values=[true, false], description='If true, performs case-insensitive matching for keyword fields. Defaults to false.', type=[boolean]}, {name='default_field', values=[*, logs.*, title], description='Default field to search if no field is provided in the query string. Supports wildcards (*).', type=[keyword]}",
          "optional" : true,
          "description" : "(Optional) KQL additional options as <<esql-function-named-params,function named parameters>>. Available in stack version 9.3.0 and later."
        }
      ],
      "variadic" : false,
      "returnType" : "boolean"
    }
  ],
  "examples" : [
    "FROM books\n| WHERE KQL(\"author: Faulkner\")",
    "FROM employees\n| WHERE KQL(\"mary\", {\"case_insensitive\": true, \"default_field\": \"first_name\", \"boost\": 1.5})"
  ],
  "preview" : false,
  "snapshot_only" : false
}
