{
  "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
  "type" : "scalar",
  "name" : "locate",
  "description" : "Returns an integer that indicates the position of a keyword substring within another string.\nReturns `0` if the substring cannot be found.\nNote that string positions start from `1`.",
  "signatures" : [
    {
      "params" : [
        {
          "name" : "string",
          "type" : "keyword",
          "optional" : false,
          "description" : "An input string"
        },
        {
          "name" : "substring",
          "type" : "keyword",
          "optional" : false,
          "description" : "A substring to locate in the input string"
        }
      ],
      "variadic" : false,
      "returnType" : "integer"
    },
    {
      "params" : [
        {
          "name" : "string",
          "type" : "keyword",
          "optional" : false,
          "description" : "An input string"
        },
        {
          "name" : "substring",
          "type" : "keyword",
          "optional" : false,
          "description" : "A substring to locate in the input string"
        },
        {
          "name" : "start",
          "type" : "integer",
          "optional" : true,
          "description" : "The start index"
        }
      ],
      "variadic" : false,
      "returnType" : "integer"
    },
    {
      "params" : [
        {
          "name" : "string",
          "type" : "keyword",
          "optional" : false,
          "description" : "An input string"
        },
        {
          "name" : "substring",
          "type" : "text",
          "optional" : false,
          "description" : "A substring to locate in the input string"
        }
      ],
      "variadic" : false,
      "returnType" : "integer"
    },
    {
      "params" : [
        {
          "name" : "string",
          "type" : "keyword",
          "optional" : false,
          "description" : "An input string"
        },
        {
          "name" : "substring",
          "type" : "text",
          "optional" : false,
          "description" : "A substring to locate in the input string"
        },
        {
          "name" : "start",
          "type" : "integer",
          "optional" : true,
          "description" : "The start index"
        }
      ],
      "variadic" : false,
      "returnType" : "integer"
    },
    {
      "params" : [
        {
          "name" : "string",
          "type" : "text",
          "optional" : false,
          "description" : "An input string"
        },
        {
          "name" : "substring",
          "type" : "keyword",
          "optional" : false,
          "description" : "A substring to locate in the input string"
        }
      ],
      "variadic" : false,
      "returnType" : "integer"
    },
    {
      "params" : [
        {
          "name" : "string",
          "type" : "text",
          "optional" : false,
          "description" : "An input string"
        },
        {
          "name" : "substring",
          "type" : "keyword",
          "optional" : false,
          "description" : "A substring to locate in the input string"
        },
        {
          "name" : "start",
          "type" : "integer",
          "optional" : true,
          "description" : "The start index"
        }
      ],
      "variadic" : false,
      "returnType" : "integer"
    },
    {
      "params" : [
        {
          "name" : "string",
          "type" : "text",
          "optional" : false,
          "description" : "An input string"
        },
        {
          "name" : "substring",
          "type" : "text",
          "optional" : false,
          "description" : "A substring to locate in the input string"
        }
      ],
      "variadic" : false,
      "returnType" : "integer"
    },
    {
      "params" : [
        {
          "name" : "string",
          "type" : "text",
          "optional" : false,
          "description" : "An input string"
        },
        {
          "name" : "substring",
          "type" : "text",
          "optional" : false,
          "description" : "A substring to locate in the input string"
        },
        {
          "name" : "start",
          "type" : "integer",
          "optional" : true,
          "description" : "The start index"
        }
      ],
      "variadic" : false,
      "returnType" : "integer"
    }
  ],
  "examples" : [
    "ROW a = \"hello\"\n| EVAL a_ll = LOCATE(a, \"ll\")"
  ],
  "preview" : false,
  "snapshot_only" : false
}
