{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ydb-qdrant-tech/json-schema/ydb-qdrant-tech-query-points-request-schema.json",
  "title": "QueryPointsRequest",
  "description": "Loose query compatibility body. A numeric vector may be supplied directly or nested under query/nearest fields.",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ydb-qdrant-tech-openapi.json#/components/schemas/QueryPointsRequest",
  "type": "object",
  "properties": {
    "vector": {
      "type": "array",
      "items": {
        "type": "number"
      }
    },
    "embedding": {
      "type": "array",
      "items": {
        "type": "number"
      }
    },
    "query": true,
    "nearest": true,
    "top": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000
    },
    "with_payload": {
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "array"
        },
        {
          "type": "object"
        }
      ]
    },
    "score_threshold": {
      "type": [
        "number",
        "null"
      ]
    },
    "filter": {
      "$ref": "#/$defs/PathSegmentsFilter"
    }
  },
  "additionalProperties": true,
  "$defs": {
    "PathSegmentsCondition": {
      "type": "object",
      "required": [
        "key",
        "match"
      ],
      "properties": {
        "key": {
          "type": "string",
          "pattern": "^pathSegments\\.\\d+$"
        },
        "match": {
          "type": "object",
          "required": [
            "value"
          ],
          "properties": {
            "value": {
              "type": "string"
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "PathSegmentsFilter": {
      "oneOf": [
        {
          "type": "object",
          "required": [
            "must"
          ],
          "properties": {
            "must": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/PathSegmentsCondition"
              }
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "should"
          ],
          "properties": {
            "should": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "must"
                ],
                "properties": {
                  "must": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/PathSegmentsCondition"
                    },
                    "minItems": 1
                  }
                },
                "additionalProperties": false
              },
              "minItems": 1
            }
          },
          "additionalProperties": false
        }
      ]
    }
  }
}