Files
qdrant/openapi/models.json
Arnaud Gourlay 97cb5091bc Split Points API #208 (#221)
Split Points API #208
2022-01-24 07:54:47 +01:00

1912 lines
77 KiB
JSON

{
"components": {
"schemas": {
"AliasOperations": {
"description": "Group of all the possible operations related to collection aliases",
"anyOf": [
{
"$ref": "#/components/schemas/CreateAliasOperation"
},
{
"$ref": "#/components/schemas/DeleteAliasOperation"
},
{
"$ref": "#/components/schemas/RenameAliasOperation"
}
]
},
"ChangeAliasesOperation": {
"description": "Operation for performing changes of collection aliases. Alias changes are atomic, meaning that no collection modifications can happen between alias operations.",
"type": "object",
"required": [
"actions"
],
"properties": {
"actions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AliasOperations"
}
}
}
},
"CollectionConfig": {
"type": "object",
"required": [
"hnsw_config",
"optimizer_config",
"params",
"wal_config"
],
"properties": {
"hnsw_config": {
"$ref": "#/components/schemas/HnswConfig"
},
"optimizer_config": {
"$ref": "#/components/schemas/OptimizersConfig"
},
"params": {
"$ref": "#/components/schemas/CollectionParams"
},
"wal_config": {
"$ref": "#/components/schemas/WalConfig"
}
}
},
"CollectionDescription": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
}
}
},
"CollectionInfo": {
"description": "Current statistics and configuration of the collection",
"type": "object",
"required": [
"config",
"disk_data_size",
"payload_schema",
"ram_data_size",
"segments_count",
"status",
"vectors_count"
],
"properties": {
"config": {
"$ref": "#/components/schemas/CollectionConfig"
},
"disk_data_size": {
"description": "Disk space, used by collection",
"type": "integer",
"format": "uint",
"minimum": 0
},
"payload_schema": {
"description": "Types of stored payload",
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/PayloadSchemaInfo"
}
},
"ram_data_size": {
"description": "RAM used by collection",
"type": "integer",
"format": "uint",
"minimum": 0
},
"segments_count": {
"description": "Number of segments in collection",
"type": "integer",
"format": "uint",
"minimum": 0
},
"status": {
"$ref": "#/components/schemas/CollectionStatus"
},
"vectors_count": {
"description": "Number of vectors in collection",
"type": "integer",
"format": "uint",
"minimum": 0
}
}
},
"CollectionParams": {
"type": "object",
"required": [
"distance",
"vector_size"
],
"properties": {
"distance": {
"$ref": "#/components/schemas/Distance"
},
"vector_size": {
"description": "Size of a vectors used",
"type": "integer",
"format": "uint",
"minimum": 0
}
}
},
"CollectionStatus": {
"description": "Current state of the collection",
"type": "string",
"enum": [
"green",
"yellow",
"red"
]
},
"CollectionUpdateOperations": {
"anyOf": [
{
"$ref": "#/components/schemas/PointOperations"
},
{
"$ref": "#/components/schemas/PayloadOps"
},
{
"$ref": "#/components/schemas/FieldIndexOperations"
}
]
},
"CollectionsResponse": {
"type": "object",
"required": [
"collections"
],
"properties": {
"collections": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CollectionDescription"
}
}
}
},
"Condition": {
"anyOf": [
{
"$ref": "#/components/schemas/FieldCondition"
},
{
"$ref": "#/components/schemas/HasIdCondition"
},
{
"$ref": "#/components/schemas/Filter"
}
]
},
"CreateAlias": {
"description": "Create alternative name for a collection. Collection will be available under both names for search, retrieve,",
"type": "object",
"required": [
"alias_name",
"collection_name"
],
"properties": {
"alias_name": {
"type": "string"
},
"collection_name": {
"type": "string"
}
}
},
"CreateAliasOperation": {
"type": "object",
"required": [
"create_alias"
],
"properties": {
"create_alias": {
"$ref": "#/components/schemas/CreateAlias"
}
}
},
"CreateCollection": {
"description": "Operation for creating new collection and (optionally) specify index params",
"type": "object",
"required": [
"distance",
"vector_size"
],
"properties": {
"distance": {
"$ref": "#/components/schemas/Distance"
},
"hnsw_config": {
"description": "Custom params for HNSW index. If none - values from service configuration file are used.",
"anyOf": [
{
"$ref": "#/components/schemas/HnswConfigDiff"
},
{
"nullable": true
}
]
},
"optimizers_config": {
"description": "Custom params for Optimizers. If none - values from service configuration file are used.",
"anyOf": [
{
"$ref": "#/components/schemas/OptimizersConfigDiff"
},
{
"nullable": true
}
]
},
"vector_size": {
"type": "integer",
"format": "uint",
"minimum": 0
},
"wal_config": {
"description": "Custom params for WAL. If none - values from service configuration file are used.",
"anyOf": [
{
"$ref": "#/components/schemas/WalConfigDiff"
},
{
"nullable": true
}
]
}
}
},
"CreateCollectionOperation": {
"description": "Operation for creating new collection and (optionally) specify index params",
"type": "object",
"required": [
"distance",
"name",
"vector_size"
],
"properties": {
"distance": {
"$ref": "#/components/schemas/Distance"
},
"hnsw_config": {
"description": "Custom params for HNSW index. If none - values from service configuration file are used.",
"anyOf": [
{
"$ref": "#/components/schemas/HnswConfigDiff"
},
{
"nullable": true
}
]
},
"name": {
"type": "string"
},
"optimizers_config": {
"description": "Custom params for Optimizers. If none - values from service configuration file are used.",
"anyOf": [
{
"$ref": "#/components/schemas/OptimizersConfigDiff"
},
{
"nullable": true
}
]
},
"vector_size": {
"type": "integer",
"format": "uint",
"minimum": 0
},
"wal_config": {
"description": "Custom params for WAL. If none - values from service configuration file are used.",
"anyOf": [
{
"$ref": "#/components/schemas/WalConfigDiff"
},
{
"nullable": true
}
]
}
}
},
"CreateFieldIndex": {
"type": "object",
"required": [
"field_name"
],
"properties": {
"field_name": {
"type": "string"
}
}
},
"DeleteAlias": {
"description": "Delete alias if exists",
"type": "object",
"required": [
"alias_name"
],
"properties": {
"alias_name": {
"type": "string"
}
}
},
"DeleteAliasOperation": {
"description": "Delete alias if exists",
"type": "object",
"required": [
"delete_alias"
],
"properties": {
"delete_alias": {
"$ref": "#/components/schemas/DeleteAlias"
}
}
},
"DeleteCollectionOperation": {
"description": "Operation for deleting collection with given name",
"type": "string"
},
"DeletePayload": {
"type": "object",
"required": [
"keys",
"points"
],
"properties": {
"keys": {
"type": "array",
"items": {
"type": "string"
}
},
"points": {
"description": "Deletes values from each point in this list",
"type": "array",
"items": {
"type": "integer",
"format": "uint64",
"minimum": 0
}
}
}
},
"Distance": {
"description": "Type of internal tags, build from payload Distance function types used to compare vectors",
"type": "string",
"enum": [
"Cosine",
"Euclid",
"Dot"
]
},
"FieldCondition": {
"description": "All possible payload filtering conditions",
"type": "object",
"required": [
"key"
],
"properties": {
"geo_bounding_box": {
"description": "Check if points geo location lies in a given area",
"anyOf": [
{
"$ref": "#/components/schemas/GeoBoundingBox"
},
{
"nullable": true
}
]
},
"geo_radius": {
"description": "Check if geo point is within a given radius",
"anyOf": [
{
"$ref": "#/components/schemas/GeoRadius"
},
{
"nullable": true
}
]
},
"key": {
"type": "string"
},
"match": {
"description": "Check if point has field with a given value",
"anyOf": [
{
"$ref": "#/components/schemas/Match"
},
{
"nullable": true
}
]
},
"range": {
"description": "Check if points value lies in a given range",
"anyOf": [
{
"$ref": "#/components/schemas/Range"
},
{
"nullable": true
}
]
}
}
},
"FieldIndexOperations": {
"oneOf": [
{
"description": "Create index for payload field",
"type": "object",
"required": [
"create_index"
],
"properties": {
"create_index": {
"type": "string"
}
},
"additionalProperties": false
},
{
"description": "Delete index for the field",
"type": "object",
"required": [
"delete_index"
],
"properties": {
"delete_index": {
"type": "string"
}
},
"additionalProperties": false
}
]
},
"Filter": {
"type": "object",
"properties": {
"must": {
"description": "All conditions must match",
"type": "array",
"items": {
"$ref": "#/components/schemas/Condition"
},
"nullable": true
},
"must_not": {
"description": "All conditions must NOT match",
"type": "array",
"items": {
"$ref": "#/components/schemas/Condition"
},
"nullable": true
},
"should": {
"description": "At least one of thous conditions should match",
"type": "array",
"items": {
"$ref": "#/components/schemas/Condition"
},
"nullable": true
}
},
"additionalProperties": false
},
"GeoBoundingBox": {
"description": "Geo filter request\n\nMatches coordinates inside the rectangle, described by coordinates of lop-left and bottom-right edges",
"type": "object",
"required": [
"bottom_right",
"top_left"
],
"properties": {
"bottom_right": {
"$ref": "#/components/schemas/GeoPoint"
},
"top_left": {
"$ref": "#/components/schemas/GeoPoint"
}
}
},
"GeoPoint": {
"description": "Geo point payload schema",
"type": "object",
"required": [
"lat",
"lon"
],
"properties": {
"lat": {
"type": "number",
"format": "double"
},
"lon": {
"type": "number",
"format": "double"
}
}
},
"GeoRadius": {
"description": "Geo filter request\n\nMatches coordinates inside the circle of `radius` and center with coordinates `center`",
"type": "object",
"required": [
"center",
"radius"
],
"properties": {
"center": {
"$ref": "#/components/schemas/GeoPoint"
},
"radius": {
"description": "Radius of the area in meters",
"type": "number",
"format": "double"
}
}
},
"HasIdCondition": {
"description": "ID-based filtering condition",
"type": "object",
"required": [
"has_id"
],
"properties": {
"has_id": {
"type": "array",
"items": {
"type": "integer",
"format": "uint64",
"minimum": 0
},
"uniqueItems": true
}
}
},
"HnswConfig": {
"description": "Config of HNSW index",
"type": "object",
"required": [
"ef_construct",
"full_scan_threshold",
"m"
],
"properties": {
"ef_construct": {
"description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.",
"type": "integer",
"format": "uint",
"minimum": 0
},
"full_scan_threshold": {
"description": "Minimal amount of points for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required.",
"type": "integer",
"format": "uint",
"minimum": 0
},
"m": {
"description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.",
"type": "integer",
"format": "uint",
"minimum": 0
}
}
},
"HnswConfigDiff": {
"type": "object",
"properties": {
"ef_construct": {
"description": "Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index.",
"type": "integer",
"format": "uint",
"minimum": 0,
"nullable": true
},
"full_scan_threshold": {
"description": "Minimal amount of points for additional payload-based indexing. If payload chunk is smaller than `full_scan_threshold` additional indexing won't be used - in this case full-scan search should be preferred by query planner and additional indexing is not required.",
"type": "integer",
"format": "uint",
"minimum": 0,
"nullable": true
},
"m": {
"description": "Number of edges per node in the index graph. Larger the value - more accurate the search, more space required.",
"type": "integer",
"format": "uint",
"minimum": 0,
"nullable": true
}
}
},
"Match": {
"description": "Match filter request",
"type": "object",
"properties": {
"integer": {
"description": "Integer value to match",
"type": "integer",
"format": "int64",
"nullable": true
},
"keyword": {
"description": "Keyword value to match",
"type": "string",
"nullable": true
}
}
},
"OptimizersConfig": {
"type": "object",
"required": [
"default_segment_number",
"deleted_threshold",
"flush_interval_sec",
"indexing_threshold",
"max_optimization_threads",
"max_segment_size",
"memmap_threshold",
"payload_indexing_threshold",
"vacuum_min_vector_number"
],
"properties": {
"default_segment_number": {
"description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads",
"type": "integer",
"format": "uint",
"minimum": 0
},
"deleted_threshold": {
"description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization",
"type": "number",
"format": "double"
},
"flush_interval_sec": {
"description": "Minimum interval between forced flushes.",
"type": "integer",
"format": "uint64",
"minimum": 0
},
"indexing_threshold": {
"description": "Maximum number of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md",
"type": "integer",
"format": "uint",
"minimum": 0
},
"max_optimization_threads": {
"description": "Maximum available threads for optimization workers",
"type": "integer",
"format": "uint",
"minimum": 0
},
"max_segment_size": {
"description": "Do not create segments larger this number of points. Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher.",
"type": "integer",
"format": "uint",
"minimum": 0
},
"memmap_threshold": {
"description": "Maximum number of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.",
"type": "integer",
"format": "uint",
"minimum": 0
},
"payload_indexing_threshold": {
"description": "Starting from this amount of vectors per-segment the engine will start building index for payload.",
"type": "integer",
"format": "uint",
"minimum": 0
},
"vacuum_min_vector_number": {
"description": "The minimal number of vectors in a segment, required to perform segment optimization",
"type": "integer",
"format": "uint",
"minimum": 0
}
}
},
"OptimizersConfigDiff": {
"type": "object",
"properties": {
"default_segment_number": {
"description": "Target amount of segments optimizer will try to keep. Real amount of segments may vary depending on multiple parameters: - Amount of stored points - Current write RPS\n\nIt is recommended to select default number of segments as a factor of the number of search threads, so that each segment would be handled evenly by one of the threads",
"type": "integer",
"format": "uint",
"minimum": 0,
"nullable": true
},
"deleted_threshold": {
"description": "The minimal fraction of deleted vectors in a segment, required to perform segment optimization",
"type": "number",
"format": "double",
"nullable": true
},
"flush_interval_sec": {
"description": "Minimum interval between forced flushes.",
"type": "integer",
"format": "uint64",
"minimum": 0,
"nullable": true
},
"indexing_threshold": {
"description": "Maximum number of vectors allowed for plain index. Default value based on https://github.com/google-research/google-research/blob/master/scann/docs/algorithms.md",
"type": "integer",
"format": "uint",
"minimum": 0,
"nullable": true
},
"max_optimization_threads": {
"description": "Maximum available threads for optimization workers",
"type": "integer",
"format": "uint",
"minimum": 0,
"nullable": true
},
"max_segment_size": {
"description": "Do not create segments larger this number of points. Large segments might require disproportionately long indexation times, therefore it makes sense to limit the size of segments.\n\nIf indexation speed have more priority for your - make this parameter lower. If search speed is more important - make this parameter higher.",
"type": "integer",
"format": "uint",
"minimum": 0,
"nullable": true
},
"memmap_threshold": {
"description": "Maximum number of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmaped file.",
"type": "integer",
"format": "uint",
"minimum": 0,
"nullable": true
},
"payload_indexing_threshold": {
"description": "Starting from this amount of vectors per-segment the engine will start building index for payload.",
"type": "integer",
"format": "uint",
"minimum": 0,
"nullable": true
},
"vacuum_min_vector_number": {
"description": "The minimal number of vectors in a segment, required to perform segment optimization",
"type": "integer",
"format": "uint",
"minimum": 0,
"nullable": true
}
}
},
"PayloadInterface": {
"description": "Structure for converting user-provided payload into internal structure representation\n\nUsed to allow user provide payload in more human-friendly format, and do not force explicit brackets, included constructions, e.t.c.\n\nExample:\n\n```json {..., \"payload\": {\"city\": \"Berlin\"}, ... } ```\n\nShould be captured by `KeywordShortcut`",
"anyOf": [
{
"$ref": "#/components/schemas/PayloadVariant_for_String"
},
{
"$ref": "#/components/schemas/PayloadVariant_for_int64"
},
{
"$ref": "#/components/schemas/PayloadVariant_for_double"
},
{
"$ref": "#/components/schemas/PayloadInterfaceStrict"
}
]
},
"PayloadInterfaceStrict": {
"description": "Fallback for `PayloadInterface` which is used if user explicitly specifies type of payload\n\nExample:\n\n```json {..., \"payload\": {\"city\": { \"type\": \"keyword\", \"value\": \"Berlin\" }}, ... } ```\n\nShould be captured by `Keyword(PayloadVariant<String>)`",
"oneOf": [
{
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"keyword"
]
},
"value": {
"$ref": "#/components/schemas/PayloadVariant_for_String"
}
}
},
{
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"integer"
]
},
"value": {
"$ref": "#/components/schemas/PayloadVariant_for_int64"
}
}
},
{
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"float"
]
},
"value": {
"$ref": "#/components/schemas/PayloadVariant_for_double"
}
}
},
{
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"geo"
]
},
"value": {
"$ref": "#/components/schemas/PayloadVariant_for_GeoPoint"
}
}
}
]
},
"PayloadOps": {
"description": "Define operations description for point payloads manipulation",
"oneOf": [
{
"description": "Set payload value, overrides if it is already exists",
"type": "object",
"required": [
"set_payload"
],
"properties": {
"set_payload": {
"$ref": "#/components/schemas/SetPayload"
}
},
"additionalProperties": false
},
{
"description": "Deletes specified payload values if they are assigned",
"type": "object",
"required": [
"delete_payload"
],
"properties": {
"delete_payload": {
"$ref": "#/components/schemas/DeletePayload"
}
},
"additionalProperties": false
},
{
"description": "Drops all Payload values associated with given points.",
"type": "object",
"required": [
"clear_payload"
],
"properties": {
"clear_payload": {
"type": "object",
"required": [
"points"
],
"properties": {
"points": {
"type": "array",
"items": {
"type": "integer",
"format": "uint64",
"minimum": 0
}
}
}
}
},
"additionalProperties": false
}
]
},
"PayloadSchemaInfo": {
"description": "Payload field type & index information",
"type": "object",
"required": [
"data_type",
"indexed"
],
"properties": {
"data_type": {
"$ref": "#/components/schemas/PayloadSchemaType"
},
"indexed": {
"type": "boolean"
}
}
},
"PayloadSchemaType": {
"description": "All possible names of payload types",
"oneOf": [
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"keyword"
]
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"integer"
]
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"float"
]
}
}
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"geo"
]
}
}
}
]
},
"PayloadSelector": {
"description": "Specifies how to treat payload selector",
"type": "object",
"required": [
"exclude",
"include"
],
"properties": {
"exclude": {
"description": "Post-exclude return payload key type",
"type": "array",
"items": {
"type": "string"
}
},
"include": {
"description": "Include return payload key type",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"PayloadType": {
"description": "All possible payload types",
"oneOf": [
{
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"keyword"
]
},
"value": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
{
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"integer"
]
},
"value": {
"type": "array",
"items": {
"type": "integer",
"format": "int64"
}
}
}
},
{
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"float"
]
},
"value": {
"type": "array",
"items": {
"type": "number",
"format": "double"
}
}
}
},
{
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"type": "string",
"enum": [
"geo"
]
},
"value": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GeoPoint"
}
}
}
}
]
},
"PayloadVariant_for_GeoPoint": {
"description": "Payload interface structure which ensures that user is allowed to pass payload in both - array and single element forms.\n\nExample:\n\nBoth versions should work: ```json {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"Berlin\", \"London\"] }}}, {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": \"Moscow\" }}}, ```",
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/GeoPoint"
}
},
{
"$ref": "#/components/schemas/GeoPoint"
}
]
},
"PayloadVariant_for_String": {
"description": "Payload interface structure which ensures that user is allowed to pass payload in both - array and single element forms.\n\nExample:\n\nBoth versions should work: ```json {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"Berlin\", \"London\"] }}}, {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": \"Moscow\" }}}, ```",
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
}
]
},
"PayloadVariant_for_double": {
"description": "Payload interface structure which ensures that user is allowed to pass payload in both - array and single element forms.\n\nExample:\n\nBoth versions should work: ```json {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"Berlin\", \"London\"] }}}, {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": \"Moscow\" }}}, ```",
"anyOf": [
{
"type": "array",
"items": {
"type": "number",
"format": "double"
}
},
{
"type": "number",
"format": "double"
}
]
},
"PayloadVariant_for_int64": {
"description": "Payload interface structure which ensures that user is allowed to pass payload in both - array and single element forms.\n\nExample:\n\nBoth versions should work: ```json {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": [\"Berlin\", \"London\"] }}}, {..., \"payload\": {\"city\": {\"type\": \"keyword\", \"value\": \"Moscow\" }}}, ```",
"anyOf": [
{
"type": "array",
"items": {
"type": "integer",
"format": "int64"
}
},
{
"type": "integer",
"format": "int64"
}
]
},
"PointInsertOperations": {
"oneOf": [
{
"description": "Inset points from a batch.",
"type": "object",
"required": [
"batch"
],
"properties": {
"batch": {
"type": "object",
"required": [
"ids",
"vectors"
],
"properties": {
"ids": {
"type": "array",
"items": {
"type": "integer",
"format": "uint64",
"minimum": 0
}
},
"payloads": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/PayloadInterface"
},
"nullable": true
},
"nullable": true
},
"vectors": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number",
"format": "float"
}
}
}
}
}
},
"additionalProperties": false
},
{
"description": "Insert points from a list",
"type": "object",
"required": [
"points"
],
"properties": {
"points": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PointStruct"
}
}
},
"additionalProperties": false
}
]
},
"PointOperations": {
"oneOf": [
{
"description": "Insert or update points",
"type": "object",
"required": [
"upsert_points"
],
"properties": {
"upsert_points": {
"$ref": "#/components/schemas/PointInsertOperations"
}
},
"additionalProperties": false
},
{
"description": "Delete point if exists",
"type": "object",
"required": [
"delete_points"
],
"properties": {
"delete_points": {
"type": "object",
"required": [
"ids"
],
"properties": {
"ids": {
"type": "array",
"items": {
"type": "integer",
"format": "uint64",
"minimum": 0
}
}
}
}
},
"additionalProperties": false
}
]
},
"PointRequest": {
"type": "object",
"required": [
"ids"
],
"properties": {
"ids": {
"type": "array",
"items": {
"type": "integer",
"format": "uint64",
"minimum": 0
}
},
"with_payload": {
"anyOf": [
{
"$ref": "#/components/schemas/WithPayloadInterface"
},
{
"nullable": true
}
]
}
}
},
"PointStruct": {
"type": "object",
"required": [
"id",
"vector"
],
"properties": {
"id": {
"description": "Point id",
"type": "integer",
"format": "uint64",
"minimum": 0
},
"payload": {
"description": "Payload values (optional)",
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/PayloadInterface"
},
"nullable": true
},
"vector": {
"description": "Vector",
"type": "array",
"items": {
"type": "number",
"format": "float"
}
}
}
},
"PointsSelector": {
"type": "object",
"required": [
"points"
],
"properties": {
"points": {
"type": "array",
"items": {
"type": "integer",
"format": "uint64",
"minimum": 0
}
}
}
},
"Range": {
"description": "Range filter request",
"type": "object",
"properties": {
"gt": {
"description": "point.key > range.gt",
"type": "number",
"format": "double",
"nullable": true
},
"gte": {
"description": "point.key >= range.gte",
"type": "number",
"format": "double",
"nullable": true
},
"lt": {
"description": "point.key < range.lt",
"type": "number",
"format": "double",
"nullable": true
},
"lte": {
"description": "point.key <= range.lte",
"type": "number",
"format": "double",
"nullable": true
}
}
},
"RecommendRequest": {
"description": "Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection.\n\nService should look for the points which are closer to positive examples and at the same time further to negative examples. The concrete way of how to compare negative and positive distances is up to implementation in `segment` crate.",
"type": "object",
"required": [
"negative",
"positive",
"top"
],
"properties": {
"filter": {
"description": "Look only for points which satisfies this conditions",
"anyOf": [
{
"$ref": "#/components/schemas/Filter"
},
{
"nullable": true
}
]
},
"negative": {
"description": "Try to avoid vectors like this",
"type": "array",
"items": {
"type": "integer",
"format": "uint64",
"minimum": 0
}
},
"params": {
"description": "Additional search params",
"anyOf": [
{
"$ref": "#/components/schemas/SearchParams"
},
{
"nullable": true
}
]
},
"positive": {
"description": "Look for vectors closest to those",
"type": "array",
"items": {
"type": "integer",
"format": "uint64",
"minimum": 0
}
},
"top": {
"description": "Max number of result to return",
"type": "integer",
"format": "uint",
"minimum": 0
}
}
},
"Record": {
"description": "Point data",
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"description": "Id of the point",
"type": "integer",
"format": "uint64",
"minimum": 0
},
"payload": {
"description": "Payload - values assigned to the point",
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/PayloadType"
},
"nullable": true
},
"vector": {
"description": "Vector of the point",
"type": "array",
"items": {
"type": "number",
"format": "float"
},
"nullable": true
}
}
},
"RenameAlias": {
"description": "Change alias to a new one",
"type": "object",
"required": [
"new_alias_name",
"old_alias_name"
],
"properties": {
"new_alias_name": {
"type": "string"
},
"old_alias_name": {
"type": "string"
}
}
},
"RenameAliasOperation": {
"description": "Change alias to a new one",
"type": "object",
"required": [
"rename_alias"
],
"properties": {
"rename_alias": {
"$ref": "#/components/schemas/RenameAlias"
}
}
},
"ScoredPoint": {
"description": "Search result",
"type": "object",
"required": [
"id",
"score",
"version"
],
"properties": {
"id": {
"description": "Point id",
"type": "integer",
"format": "uint64",
"minimum": 0
},
"payload": {
"description": "Payload - values assigned to the point",
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/PayloadType"
},
"nullable": true
},
"score": {
"description": "Points vector distance to the query vector",
"type": "number",
"format": "float"
},
"vector": {
"description": "Vector of the point",
"type": "array",
"items": {
"type": "number",
"format": "float"
},
"nullable": true
},
"version": {
"description": "Point version",
"type": "integer",
"format": "uint64",
"minimum": 0
}
}
},
"ScrollRequest": {
"description": "Scroll request - paginate over all points which matches given condition",
"type": "object",
"properties": {
"filter": {
"description": "Look only for points which satisfies this conditions. If not provided - all points.",
"anyOf": [
{
"$ref": "#/components/schemas/Filter"
},
{
"nullable": true
}
]
},
"limit": {
"description": "Page size. Default: 10",
"type": "integer",
"format": "uint",
"minimum": 0,
"nullable": true
},
"offset": {
"description": "Start ID to read points from. Default: 0",
"type": "integer",
"format": "uint64",
"minimum": 0,
"nullable": true
},
"with_payload": {
"description": "Return point payload with the result. Default: True",
"anyOf": [
{
"$ref": "#/components/schemas/WithPayloadInterface"
},
{
"nullable": true
}
]
},
"with_vector": {
"description": "Return point vector with the result. Default: false",
"type": "boolean",
"nullable": true
}
}
},
"ScrollResult": {
"description": "Result of the points read request",
"type": "object",
"required": [
"points"
],
"properties": {
"next_page_offset": {
"description": "Offset which should be used to retrieve a next page result",
"type": "integer",
"format": "uint64",
"minimum": 0,
"nullable": true
},
"points": {
"description": "List of retrieved points",
"type": "array",
"items": {
"$ref": "#/components/schemas/Record"
}
}
}
},
"SearchParams": {
"description": "Additional parameters of the search",
"type": "object",
"properties": {
"hnsw_ef": {
"description": "Params relevant to HNSW index /// Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search.",
"type": "integer",
"format": "uint",
"minimum": 0,
"nullable": true
}
}
},
"SearchRequest": {
"description": "Search request. Holds all conditions and parameters for the search of most similar points by vector similarity given the filtering restrictions.",
"type": "object",
"required": [
"top",
"vector"
],
"properties": {
"filter": {
"description": "Look only for points which satisfies this conditions",
"anyOf": [
{
"$ref": "#/components/schemas/Filter"
},
{
"nullable": true
}
]
},
"params": {
"description": "Additional search params",
"anyOf": [
{
"$ref": "#/components/schemas/SearchParams"
},
{
"nullable": true
}
]
},
"top": {
"description": "Max number of result to return",
"type": "integer",
"format": "uint",
"minimum": 0
},
"vector": {
"description": "Look for vectors closest to this",
"type": "array",
"items": {
"type": "number",
"format": "float"
}
},
"with_payload": {
"description": "Payload interface",
"anyOf": [
{
"$ref": "#/components/schemas/WithPayloadInterface"
},
{
"nullable": true
}
]
},
"with_vector": {
"description": "Return point vector with the result. Default: false",
"type": "boolean",
"nullable": true
}
}
},
"SetPayload": {
"type": "object",
"required": [
"payload",
"points"
],
"properties": {
"payload": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/PayloadInterface"
}
},
"points": {
"description": "Assigns payload to each point in this list",
"type": "array",
"items": {
"type": "integer",
"format": "uint64",
"minimum": 0
}
}
}
},
"StorageOperations": {
"description": "Enumeration of all possible collection update operations",
"oneOf": [
{
"type": "object",
"required": [
"create_collection"
],
"properties": {
"create_collection": {
"$ref": "#/components/schemas/CreateCollectionOperation"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"update_collection"
],
"properties": {
"update_collection": {
"$ref": "#/components/schemas/UpdateCollectionOperation"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"delete_collection"
],
"properties": {
"delete_collection": {
"$ref": "#/components/schemas/DeleteCollectionOperation"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"change_aliases"
],
"properties": {
"change_aliases": {
"$ref": "#/components/schemas/ChangeAliasesOperation"
}
},
"additionalProperties": false
}
]
},
"UpdateCollection": {
"description": "Operation for updating parameters of the existing collection",
"type": "object",
"properties": {
"optimizers_config": {
"description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete",
"anyOf": [
{
"$ref": "#/components/schemas/OptimizersConfigDiff"
},
{
"nullable": true
}
]
}
}
},
"UpdateCollectionOperation": {
"description": "Operation for updating parameters of the existing collection",
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"optimizers_config": {
"description": "Custom params for Optimizers. If none - values from service configuration file are used. This operation is blocking, it will only proceed ones all current optimizations are complete",
"anyOf": [
{
"$ref": "#/components/schemas/OptimizersConfigDiff"
},
{
"nullable": true
}
]
}
}
},
"UpdateResult": {
"type": "object",
"required": [
"operation_id",
"status"
],
"properties": {
"operation_id": {
"description": "Sequential number of the operation",
"type": "integer",
"format": "uint64",
"minimum": 0
},
"status": {
"$ref": "#/components/schemas/UpdateStatus"
}
}
},
"UpdateStatus": {
"type": "string",
"enum": [
"acknowledged",
"completed"
]
},
"WalConfig": {
"type": "object",
"required": [
"wal_capacity_mb",
"wal_segments_ahead"
],
"properties": {
"wal_capacity_mb": {
"description": "Size of a single WAL segment in MB",
"type": "integer",
"format": "uint",
"minimum": 0
},
"wal_segments_ahead": {
"description": "Number of WAL segments to create ahead of actually used ones",
"type": "integer",
"format": "uint",
"minimum": 0
}
}
},
"WalConfigDiff": {
"type": "object",
"properties": {
"wal_capacity_mb": {
"description": "Size of a single WAL segment in MB",
"type": "integer",
"format": "uint",
"minimum": 0,
"nullable": true
},
"wal_segments_ahead": {
"description": "Number of WAL segments to create ahead of actually used ones",
"type": "integer",
"format": "uint",
"minimum": 0,
"nullable": true
}
}
},
"WithPayloadInterface": {
"description": "Options for specifying which payload to include or not",
"anyOf": [
{
"type": "boolean"
},
{
"type": "array",
"items": {
"type": "string"
}
},
{
"$ref": "#/components/schemas/PayloadSelector"
}
]
}
}
}
}