From 4f14df0ee388aa8ed829dba9f5eab1b638da9252 Mon Sep 17 00:00:00 2001 From: Ivan Pleshkov Date: Sun, 8 Oct 2023 21:24:56 +0000 Subject: [PATCH 1/4] update openapi --- .../src/openapi/generated_schema.ts | 73 ++++++++++++++++--- 1 file changed, 61 insertions(+), 12 deletions(-) diff --git a/packages/js-client-rest/src/openapi/generated_schema.ts b/packages/js-client-rest/src/openapi/generated_schema.ts index f7dee12..d2aa2ff 100644 --- a/packages/js-client-rest/src/openapi/generated_schema.ts +++ b/packages/js-client-rest/src/openapi/generated_schema.ts @@ -465,6 +465,11 @@ export interface components { * @default 1 */ write_consistency_factor?: number; + /** + * Format: uint32 + * @description Defines how many additional replicas should be processing read request at the same time. Default value is Auto, which means that fan-out will be determined automatically based on the busyness of the local replica. Having more than 0 might be useful to smooth latency spikes of individual nodes. + */ + read_fan_out_factor?: number | null; /** * @description If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM. * @default false @@ -805,6 +810,8 @@ export interface components { geo_bounding_box?: components["schemas"]["GeoBoundingBox"] | (Record | null); /** @description Check if geo point is within a given radius */ geo_radius?: components["schemas"]["GeoRadius"] | (Record | null); + /** @description Check if geo point is within a given polygon */ + geo_polygon?: components["schemas"]["GeoPolygon"] | (Record | null); /** @description Check number of values of the field */ values_count?: components["schemas"]["ValuesCount"] | (Record | null); }; @@ -880,6 +887,20 @@ export interface components { */ radius: number; }; + /** + * @description Geo filter request + * + * Matches coordinates inside the polygon, defined by `exterior` and `interiors` + */ + GeoPolygon: { + exterior: components["schemas"]["GeoLineString"]; + /** @description Interior lines (if present) bound holes within the surface each GeoLineString must consist of a minimum of 4 points, and the first and last points must be the same. */ + interiors?: (components["schemas"]["GeoLineString"])[] | null; + }; + /** @description Ordered sequence of GeoPoints representing the line */ + GeoLineString: { + points: (components["schemas"]["GeoPoint"])[]; + }; /** @description Values count filter request */ ValuesCount: { /** @@ -959,10 +980,10 @@ export interface components { */ ignore?: boolean; /** - * @description If true, use original vectors to re-score top-k results. Might require more time in case if original vectors are stored on disk. Default is false. - * @default false + * @description If true, use original vectors to re-score top-k results. Might require more time in case if original vectors are stored on disk. If not set, qdrant decides automatically apply rescoring or not. + * @default null */ - rescore?: boolean; + rescore?: boolean | null; /** * Format: double * @description Oversampling factor for quantization. Default is 1.0. @@ -1006,18 +1027,23 @@ export interface components { */ UpdateStatus: "acknowledged" | "completed"; /** - * @description Recommendation request. Provides positive and negative examples of the vectors, which are already stored in the collection. + * @description Recommendation request. Provides positive and negative examples of the vectors, which can be ids of points that are already stored in the collection, raw vectors, or even ids and vectors combined. * - * Service 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. + * Service 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 the `strategy` chosen. */ RecommendRequest: { - /** @description Look for vectors closest to those */ - positive: (components["schemas"]["ExtendedPointId"])[]; + /** + * @description Look for vectors closest to those + * @default [] + */ + positive?: (components["schemas"]["RecommendExample"])[]; /** * @description Try to avoid vectors like this * @default [] */ - negative?: (components["schemas"]["ExtendedPointId"])[]; + negative?: (components["schemas"]["RecommendExample"])[]; + /** @description How to use positive and negative examples to find the results */ + strategy?: components["schemas"]["RecommendStrategy"] | (Record | null); /** @description Look only for points which satisfies this conditions */ filter?: components["schemas"]["Filter"] | (Record | null); /** @description Additional search params */ @@ -1056,6 +1082,16 @@ export interface components { */ lookup_from?: components["schemas"]["LookupLocation"] | (Record | null); }; + RecommendExample: components["schemas"]["ExtendedPointId"] | (number)[]; + /** + * @description How to use positive and negative examples to find the results, default is `average_vector`: + * + * * `average_vector` - Average positive and negative vectors and create a single query with the formula `query = avg_pos + avg_pos - avg_neg`. Then performs normal search. + * + * * `best_score` - Uses custom search objective. Each candidate is compared against all examples, its score is then chosen from the `max(max_pos_score, max_neg_score)`. If the `max_neg_score` is chosen then it is squared and negated, otherwise it is just the `max_pos_score`. + * @enum {string} + */ + RecommendStrategy: "average_vector" | "best_score"; UsingVector: string; /** @description Defines a location to use for looking up the vector. Specifies collection and vector field name. */ LookupLocation: { @@ -1208,7 +1244,7 @@ export interface components { }; /** @description Operation for updating parameters of the existing collection */ UpdateCollection: { - /** @description Vector data parameters to update. It is possible to provide one config for single vector mode and list of configs for multiple vectors mode. */ + /** @description Map of vector data parameters to update for each named vector. To update parameters in a collection having a single unnamed vector, use an empty string as name. */ vectors?: components["schemas"]["VectorsConfigDiff"] | (Record | null); /** @description Custom params for Optimizers. If none - it is left unchanged. This operation is blocking, it will only proceed once all current optimizations are complete */ optimizers_config?: components["schemas"]["OptimizersConfigDiff"] | (Record | null); @@ -1252,6 +1288,11 @@ export interface components { * @description Minimal number successful responses from replicas to consider operation successful */ write_consistency_factor?: number | null; + /** + * Format: uint32 + * @description Fan-out every read request to these many additional remote nodes (and return first available response) + */ + read_fan_out_factor?: number | null; /** * @description If true - point's payload will not be stored in memory. It will be read from the disk every time it is requested. This setting saves RAM by (slightly) increasing the response time. Note: those payload values that are involved in filtering and are indexed - remain in RAM. * @default null @@ -1943,13 +1984,21 @@ export interface components { with_vectors?: components["schemas"]["WithVector"] | (Record | null); }; RecommendGroupsRequest: { - /** @description Look for vectors closest to those */ - positive: (components["schemas"]["ExtendedPointId"])[]; + /** + * @description Look for vectors closest to those + * @default [] + */ + positive?: (components["schemas"]["RecommendExample"])[]; /** * @description Try to avoid vectors like this * @default [] */ - negative?: (components["schemas"]["ExtendedPointId"])[]; + negative?: (components["schemas"]["RecommendExample"])[]; + /** + * @description How to use positive and negative examples to find the results + * @default null + */ + strategy?: components["schemas"]["RecommendStrategy"] | (Record | null); /** @description Look only for points which satisfies this conditions */ filter?: components["schemas"]["Filter"] | (Record | null); /** @description Additional search params */ From 034f47d97f0e2f2948b204c13712bb6ad2c72472 Mon Sep 17 00:00:00 2001 From: Ivan Pleshkov Date: Sun, 8 Oct 2023 21:28:29 +0000 Subject: [PATCH 2/4] update proto files --- .../js-client-grpc/proto/collections.proto | 2 + packages/js-client-grpc/proto/points.proto | 42 +++-- .../js-client-grpc/proto/points_service.proto | 2 +- .../scripts/generate-grpc-sources.sh | 2 + .../src/proto/collections_pb.ts | 16 ++ .../js-client-grpc/src/proto/points_pb.ts | 155 ++++++++++++++++-- .../src/proto/points_service_connect.ts | 2 +- 7 files changed, 198 insertions(+), 23 deletions(-) diff --git a/packages/js-client-grpc/proto/collections.proto b/packages/js-client-grpc/proto/collections.proto index 794f3ee..093a5a7 100644 --- a/packages/js-client-grpc/proto/collections.proto +++ b/packages/js-client-grpc/proto/collections.proto @@ -278,12 +278,14 @@ message CollectionParams { optional VectorsConfig vectors_config = 5; // Configuration for vectors optional uint32 replication_factor = 6; // Number of replicas of each shard that network tries to maintain optional uint32 write_consistency_factor = 7; // How many replicas should apply the operation for us to consider it successful + optional uint32 read_fan_out_factor = 8; // Fan-out every read request to these many additional remote nodes (and return first available response) } message CollectionParamsDiff { optional uint32 replication_factor = 1; // Number of replicas of each shard that network tries to maintain optional uint32 write_consistency_factor = 2; // How many replicas should apply the operation for us to consider it successful optional bool on_disk_payload = 3; // If true - point's payload will not be stored in memory + optional uint32 read_fan_out_factor = 4; // Fan-out every read request to these many additional remote nodes (and return first available response) } message CollectionConfig { diff --git a/packages/js-client-grpc/proto/points.proto b/packages/js-client-grpc/proto/points.proto index d5d91fe..43a7e32 100644 --- a/packages/js-client-grpc/proto/points.proto +++ b/packages/js-client-grpc/proto/points.proto @@ -186,7 +186,7 @@ message QuantizationSearchParams { optional bool ignore = 1; /* - If true, use original vectors to re-score top-k results. Default is true. + If true, use original vectors to re-score top-k results. If ignored, qdrant decides automatically does rescore enabled or not. */ optional bool rescore = 2; @@ -281,6 +281,18 @@ message ScrollPoints { optional ReadConsistency read_consistency = 8; // Options for specifying read consistency guarantees } +// How to use positive and negative vectors to find the results, default is `AverageVector`: +enum RecommendStrategy { + // Average positive and negative vectors and create a single query with the formula + // `query = avg_pos + avg_pos - avg_neg`. Then performs normal search. + AverageVector = 0; + + // Uses custom search objective. Each candidate is compared against all + // examples, its score is then chosen from the `max(max_pos_score, max_neg_score)`. + // If the `max_neg_score` is chosen then it is squared and negated. + BestScore = 1; +} + message LookupLocation { string collection_name = 1; optional string vector_name = 2; // Which vector to use for search, if not specified - use default vector @@ -288,8 +300,8 @@ message LookupLocation { message RecommendPoints { string collection_name = 1; // name of the collection - repeated PointId positive = 2; // Look for vectors closest to those - repeated PointId negative = 3; // Try to avoid vectors like this + repeated PointId positive = 2; // Look for vectors closest to the vectors from these points + repeated PointId negative = 3; // Try to avoid vectors like the vector from these points Filter filter = 4; // Filter conditions - return only those points that satisfy the specified conditions uint64 limit = 5; // Max number of result reserved 6; // deprecated "with_vector" field @@ -301,6 +313,9 @@ message RecommendPoints { optional WithVectorsSelector with_vectors = 12; // Options for specifying which vectors to include into response optional LookupLocation lookup_from = 13; // Name of the collection to use for points lookup, if not specified - use current collection optional ReadConsistency read_consistency = 14; // Options for specifying read consistency guarantees + optional RecommendStrategy strategy = 16; // How to use the example vectors to find the results + repeated Vector positive_vectors = 17; // Look for vectors closest to those + repeated Vector negative_vectors = 18; // Try to avoid vectors like this } message RecommendBatchPoints { @@ -311,8 +326,8 @@ message RecommendBatchPoints { message RecommendPointGroups { string collection_name = 1; // Name of the collection - repeated PointId positive = 2; // Look for vectors closest to those - repeated PointId negative = 3; // Try to avoid vectors like this + repeated PointId positive = 2; // Look for vectors closest to the vectors from these points + repeated PointId negative = 3; // Try to avoid vectors like the vector from these points Filter filter = 4; // Filter conditions - return only those points that satisfy the specified conditions uint32 limit = 5; // Max number of groups in result WithPayloadSelector with_payload = 6; // Options for specifying which payload to include or not @@ -325,6 +340,9 @@ message RecommendPointGroups { uint32 group_size = 13; // Maximum amount of points to return per group optional ReadConsistency read_consistency = 14; // Options for specifying read consistency guarantees optional WithLookup with_lookup = 15; // Options for specifying how to use the group id to lookup points in another collection + optional RecommendStrategy strategy = 17; // How to use the example vectors to find the results + repeated Vector positive_vectors = 18; // Look for vectors closest to those + repeated Vector negative_vectors = 19; // Try to avoid vectors like this } message CountPoints { @@ -533,7 +551,7 @@ message FieldCondition { GeoBoundingBox geo_bounding_box = 4; // Check if points geolocation lies in a given area GeoRadius geo_radius = 5; // Check if geo point is within a given radius ValuesCount values_count = 6; // Check number of values for a specific field - // GeoPolygon geo_polygon = 7; // Check if geo point is within a given polygon + GeoPolygon geo_polygon = 7; // Check if geo point is within a given polygon } message Match { @@ -574,11 +592,15 @@ message GeoRadius { float radius = 2; // In meters } +message GeoLineString { + repeated GeoPoint points = 1; // Ordered sequence of GeoPoints representing the line +} + +// For a valid GeoPolygon, both the exterior and interior GeoLineStrings must consist of a minimum of 4 points. +// Additionally, the first and last points of each GeoLineString must be the same. message GeoPolygon { - // Ordered list of coordinates representing the vertices of a polygon. - // The minimum size is 4, and the first coordinate and the last coordinate - // should be the same to form a closed polygon. - repeated GeoPoint points = 1; + GeoLineString exterior = 1; // The exterior line bounds the surface + repeated GeoLineString interiors = 2; // Interior lines (if present) bound holes within the surface } message ValuesCount { diff --git a/packages/js-client-grpc/proto/points_service.proto b/packages/js-client-grpc/proto/points_service.proto index 607e116..5921777 100644 --- a/packages/js-client-grpc/proto/points_service.proto +++ b/packages/js-client-grpc/proto/points_service.proto @@ -64,7 +64,7 @@ service Points { */ rpc SearchGroups (SearchPointGroups) returns (SearchGroupsResponse) {} /* - Iterate over all or filtered points points + Iterate over all or filtered points */ rpc Scroll (ScrollPoints) returns (ScrollResponse) {} /* diff --git a/packages/js-client-grpc/scripts/generate-grpc-sources.sh b/packages/js-client-grpc/scripts/generate-grpc-sources.sh index 218c74d..7401f98 100755 --- a/packages/js-client-grpc/scripts/generate-grpc-sources.sh +++ b/packages/js-client-grpc/scripts/generate-grpc-sources.sh @@ -24,11 +24,13 @@ rm $CLIENT_DIR/points_internal_service.proto rm $CLIENT_DIR/collections_internal_service.proto rm $CLIENT_DIR/raft_service.proto rm $CLIENT_DIR/qdrant_internal_service.proto +rm $CLIENT_DIR/health_check.proto cat $CLIENT_DIR/qdrant.proto \ | grep -v 'collections_internal_service.proto' \ | grep -v 'points_internal_service.proto' \ | grep -v 'raft_service.proto' \ | grep -v 'qdrant_internal_service.proto' \ + | grep -v 'health_check.proto' \ > $CLIENT_DIR/qdrant_tmp.proto mv $CLIENT_DIR/qdrant_tmp.proto $CLIENT_DIR/qdrant.proto diff --git a/packages/js-client-grpc/src/proto/collections_pb.ts b/packages/js-client-grpc/src/proto/collections_pb.ts index 66fca80..d8c4d49 100644 --- a/packages/js-client-grpc/src/proto/collections_pb.ts +++ b/packages/js-client-grpc/src/proto/collections_pb.ts @@ -1717,6 +1717,13 @@ export class CollectionParams extends Message { */ writeConsistencyFactor?: number; + /** + * Fan-out every read request to these many additional remote nodes (and return first available response) + * + * @generated from field: optional uint32 read_fan_out_factor = 8; + */ + readFanOutFactor?: number; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -1730,6 +1737,7 @@ export class CollectionParams extends Message { { no: 5, name: "vectors_config", kind: "message", T: VectorsConfig, opt: true }, { no: 6, name: "replication_factor", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, { no: 7, name: "write_consistency_factor", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, + { no: 8, name: "read_fan_out_factor", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): CollectionParams { @@ -1774,6 +1782,13 @@ export class CollectionParamsDiff extends Message { */ onDiskPayload?: boolean; + /** + * Fan-out every read request to these many additional remote nodes (and return first available response) + * + * @generated from field: optional uint32 read_fan_out_factor = 4; + */ + readFanOutFactor?: number; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -1785,6 +1800,7 @@ export class CollectionParamsDiff extends Message { { no: 1, name: "replication_factor", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, { no: 2, name: "write_consistency_factor", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, { no: 3, name: "on_disk_payload", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, + { no: 4, name: "read_fan_out_factor", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): CollectionParamsDiff { diff --git a/packages/js-client-grpc/src/proto/points_pb.ts b/packages/js-client-grpc/src/proto/points_pb.ts index 072f009..5d5a957 100644 --- a/packages/js-client-grpc/src/proto/points_pb.ts +++ b/packages/js-client-grpc/src/proto/points_pb.ts @@ -116,6 +116,35 @@ proto3.util.setEnumType(FieldType, "qdrant.FieldType", [ { no: 5, name: "FieldTypeBool" }, ]); +/** + * How to use positive and negative vectors to find the results, default is `AverageVector`: + * + * @generated from enum qdrant.RecommendStrategy + */ +export enum RecommendStrategy { + /** + * Average positive and negative vectors and create a single query with the formula + * `query = avg_pos + avg_pos - avg_neg`. Then performs normal search. + * + * @generated from enum value: AverageVector = 0; + */ + AverageVector = 0, + + /** + * Uses custom search objective. Each candidate is compared against all + * examples, its score is then chosen from the `max(max_pos_score, max_neg_score)`. + * If the `max_neg_score` is chosen then it is squared and negated. + * + * @generated from enum value: BestScore = 1; + */ + BestScore = 1, +} +// Retrieve enum metadata with: proto3.getEnumType(RecommendStrategy) +proto3.util.setEnumType(RecommendStrategy, "qdrant.RecommendStrategy", [ + { no: 0, name: "AverageVector" }, + { no: 1, name: "BestScore" }, +]); + /** * @generated from enum qdrant.UpdateStatus */ @@ -1384,7 +1413,7 @@ export class QuantizationSearchParams extends Message /** * - * If true, use original vectors to re-score top-k results. Default is true. + * If true, use original vectors to re-score top-k results. If ignored, qdrant decides automatically does rescore enabled or not. * * @generated from field: optional bool rescore = 2; */ @@ -2008,14 +2037,14 @@ export class RecommendPoints extends Message { collectionName = ""; /** - * Look for vectors closest to those + * Look for vectors closest to the vectors from these points * * @generated from field: repeated qdrant.PointId positive = 2; */ positive: PointId[] = []; /** - * Try to avoid vectors like this + * Try to avoid vectors like the vector from these points * * @generated from field: repeated qdrant.PointId negative = 3; */ @@ -2091,6 +2120,27 @@ export class RecommendPoints extends Message { */ readConsistency?: ReadConsistency; + /** + * How to use the example vectors to find the results + * + * @generated from field: optional qdrant.RecommendStrategy strategy = 16; + */ + strategy?: RecommendStrategy; + + /** + * Look for vectors closest to those + * + * @generated from field: repeated qdrant.Vector positive_vectors = 17; + */ + positiveVectors: Vector[] = []; + + /** + * Try to avoid vectors like this + * + * @generated from field: repeated qdrant.Vector negative_vectors = 18; + */ + negativeVectors: Vector[] = []; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -2112,6 +2162,9 @@ export class RecommendPoints extends Message { { no: 12, name: "with_vectors", kind: "message", T: WithVectorsSelector, opt: true }, { no: 13, name: "lookup_from", kind: "message", T: LookupLocation, opt: true }, { no: 14, name: "read_consistency", kind: "message", T: ReadConsistency, opt: true }, + { no: 16, name: "strategy", kind: "enum", T: proto3.getEnumType(RecommendStrategy), opt: true }, + { no: 17, name: "positive_vectors", kind: "message", T: Vector, repeated: true }, + { no: 18, name: "negative_vectors", kind: "message", T: Vector, repeated: true }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): RecommendPoints { @@ -2196,14 +2249,14 @@ export class RecommendPointGroups extends Message { collectionName = ""; /** - * Look for vectors closest to those + * Look for vectors closest to the vectors from these points * * @generated from field: repeated qdrant.PointId positive = 2; */ positive: PointId[] = []; /** - * Try to avoid vectors like this + * Try to avoid vectors like the vector from these points * * @generated from field: repeated qdrant.PointId negative = 3; */ @@ -2293,6 +2346,27 @@ export class RecommendPointGroups extends Message { */ withLookup?: WithLookup; + /** + * How to use the example vectors to find the results + * + * @generated from field: optional qdrant.RecommendStrategy strategy = 17; + */ + strategy?: RecommendStrategy; + + /** + * Look for vectors closest to those + * + * @generated from field: repeated qdrant.Vector positive_vectors = 18; + */ + positiveVectors: Vector[] = []; + + /** + * Try to avoid vectors like this + * + * @generated from field: repeated qdrant.Vector negative_vectors = 19; + */ + negativeVectors: Vector[] = []; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -2316,6 +2390,9 @@ export class RecommendPointGroups extends Message { { no: 13, name: "group_size", kind: "scalar", T: 13 /* ScalarType.UINT32 */ }, { no: 14, name: "read_consistency", kind: "message", T: ReadConsistency, opt: true }, { no: 15, name: "with_lookup", kind: "message", T: WithLookup, opt: true }, + { no: 17, name: "strategy", kind: "enum", T: proto3.getEnumType(RecommendStrategy), opt: true }, + { no: 18, name: "positive_vectors", kind: "message", T: Vector, repeated: true }, + { no: 19, name: "negative_vectors", kind: "message", T: Vector, repeated: true }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): RecommendPointGroups { @@ -3992,6 +4069,13 @@ export class FieldCondition extends Message { */ valuesCount?: ValuesCount; + /** + * Check if geo point is within a given polygon + * + * @generated from field: qdrant.GeoPolygon geo_polygon = 7; + */ + geoPolygon?: GeoPolygon; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -4006,6 +4090,7 @@ export class FieldCondition extends Message { { no: 4, name: "geo_bounding_box", kind: "message", T: GeoBoundingBox }, { no: 5, name: "geo_radius", kind: "message", T: GeoRadius }, { no: 6, name: "values_count", kind: "message", T: ValuesCount }, + { no: 7, name: "geo_polygon", kind: "message", T: GeoPolygon }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): FieldCondition { @@ -4357,18 +4442,65 @@ export class GeoRadius extends Message { } /** - * @generated from message qdrant.GeoPolygon + * @generated from message qdrant.GeoLineString */ -export class GeoPolygon extends Message { +export class GeoLineString extends Message { /** - * Ordered list of coordinates representing the vertices of a polygon. - * The minimum size is 4, and the first coordinate and the last coordinate - * should be the same to form a closed polygon. + * Ordered sequence of GeoPoints representing the line * * @generated from field: repeated qdrant.GeoPoint points = 1; */ points: GeoPoint[] = []; + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "qdrant.GeoLineString"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "points", kind: "message", T: GeoPoint, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GeoLineString { + return new GeoLineString().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GeoLineString { + return new GeoLineString().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GeoLineString { + return new GeoLineString().fromJsonString(jsonString, options); + } + + static equals(a: GeoLineString | PlainMessage | undefined, b: GeoLineString | PlainMessage | undefined): boolean { + return proto3.util.equals(GeoLineString, a, b); + } +} + +/** + * For a valid GeoPolygon, both the exterior and interior GeoLineStrings must consist of a minimum of 4 points. + * Additionally, the first and last points of each GeoLineString must be the same. + * + * @generated from message qdrant.GeoPolygon + */ +export class GeoPolygon extends Message { + /** + * The exterior line bounds the surface + * + * @generated from field: qdrant.GeoLineString exterior = 1; + */ + exterior?: GeoLineString; + + /** + * Interior lines (if present) bound holes within the surface + * + * @generated from field: repeated qdrant.GeoLineString interiors = 2; + */ + interiors: GeoLineString[] = []; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -4377,7 +4509,8 @@ export class GeoPolygon extends Message { static readonly runtime: typeof proto3 = proto3; static readonly typeName = "qdrant.GeoPolygon"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "points", kind: "message", T: GeoPoint, repeated: true }, + { no: 1, name: "exterior", kind: "message", T: GeoLineString }, + { no: 2, name: "interiors", kind: "message", T: GeoLineString, repeated: true }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): GeoPolygon { diff --git a/packages/js-client-grpc/src/proto/points_service_connect.ts b/packages/js-client-grpc/src/proto/points_service_connect.ts index 9df4aaa..439a676 100644 --- a/packages/js-client-grpc/src/proto/points_service_connect.ts +++ b/packages/js-client-grpc/src/proto/points_service_connect.ts @@ -182,7 +182,7 @@ export const Points = { }, /** * - * Iterate over all or filtered points points + * Iterate over all or filtered points * * @generated from rpc qdrant.Points.Scroll */ From 902fd51d67f199ec4df0b8c2542873158382235e Mon Sep 17 00:00:00 2001 From: Ivan Pleshkov Date: Sun, 8 Oct 2023 21:32:38 +0000 Subject: [PATCH 3/4] version up --- examples/node-js-basic/package.json | 2 +- packages/js-client-grpc/CHANGELOG.md | 6 ++++++ packages/js-client-grpc/package.json | 2 +- packages/js-client-rest/CHANGELOG.md | 6 ++++++ packages/js-client-rest/package.json | 2 +- packages/qdrant-js/CHANGELOG.md | 12 ++++++++++++ packages/qdrant-js/package.json | 6 +++--- pnpm-lock.yaml | 4 ++-- 8 files changed, 32 insertions(+), 8 deletions(-) diff --git a/examples/node-js-basic/package.json b/examples/node-js-basic/package.json index db77291..47e0de9 100644 --- a/examples/node-js-basic/package.json +++ b/examples/node-js-basic/package.json @@ -15,6 +15,6 @@ "author": "Qdrant Team", "license": "Apache-2.0", "dependencies": { - "@qdrant/qdrant-js": "^1.5.0" + "@qdrant/qdrant-js": "^1.6.0" } } diff --git a/packages/js-client-grpc/CHANGELOG.md b/packages/js-client-grpc/CHANGELOG.md index 0a23e90..4533758 100644 --- a/packages/js-client-grpc/CHANGELOG.md +++ b/packages/js-client-grpc/CHANGELOG.md @@ -1,5 +1,11 @@ # @qdrant/js-client-grpc +## 1.6.0 + +### Minor Changes + +- Qdrant v1.6.0 API + ## 1.5.0 ### Minor Changes diff --git a/packages/js-client-grpc/package.json b/packages/js-client-grpc/package.json index e6ab1ec..71b6f92 100644 --- a/packages/js-client-grpc/package.json +++ b/packages/js-client-grpc/package.json @@ -1,6 +1,6 @@ { "name": "@qdrant/js-client-grpc", - "version": "1.5.0", + "version": "1.6.0", "engines": { "node": ">=18.0.0", "pnpm": ">=8" diff --git a/packages/js-client-rest/CHANGELOG.md b/packages/js-client-rest/CHANGELOG.md index 31dda29..9ed22ef 100644 --- a/packages/js-client-rest/CHANGELOG.md +++ b/packages/js-client-rest/CHANGELOG.md @@ -1,5 +1,11 @@ # @qdrant/js-client-rest +## 1.6.0 + +### Minor Changes + +- Qdrant v1.6.0 API + ## 1.5.0 ### Minor Changes diff --git a/packages/js-client-rest/package.json b/packages/js-client-rest/package.json index 39f7d25..0c8b2a1 100644 --- a/packages/js-client-rest/package.json +++ b/packages/js-client-rest/package.json @@ -1,6 +1,6 @@ { "name": "@qdrant/js-client-rest", - "version": "1.5.0", + "version": "1.6.0", "engines": { "node": ">=18.0.0", "pnpm": ">=8" diff --git a/packages/qdrant-js/CHANGELOG.md b/packages/qdrant-js/CHANGELOG.md index 7d4c07a..033bb8b 100644 --- a/packages/qdrant-js/CHANGELOG.md +++ b/packages/qdrant-js/CHANGELOG.md @@ -1,5 +1,17 @@ # @qdrant/qdrant-js +## 1.6.0 + +### Minor Changes + +- Qdrant v1.6.0 API + +### Patch Changes + +- Updated dependencies []: + - @qdrant/js-client-grpc@1.6.0 + - @qdrant/js-client-rest@1.6.0 + ## 1.5.0 ### Minor Changes diff --git a/packages/qdrant-js/package.json b/packages/qdrant-js/package.json index 07c0847..ba4b6fd 100644 --- a/packages/qdrant-js/package.json +++ b/packages/qdrant-js/package.json @@ -1,6 +1,6 @@ { "name": "@qdrant/qdrant-js", - "version": "1.5.0", + "version": "1.6.0", "engines": { "node": ">=18.0.0", "pnpm": ">=8" @@ -57,8 +57,8 @@ "clean": "rimraf ./dist" }, "dependencies": { - "@qdrant/js-client-rest": "workspace:1.5.0", - "@qdrant/js-client-grpc": "workspace:1.5.0" + "@qdrant/js-client-rest": "workspace:1.6.0", + "@qdrant/js-client-grpc": "workspace:1.6.0" }, "peerDependencies": { "typescript": ">=4.1" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0d155ff..da38a8a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -118,10 +118,10 @@ importers: packages/qdrant-js: dependencies: '@qdrant/js-client-grpc': - specifier: workspace:1.5.0 + specifier: workspace:1.6.0 version: link:../js-client-grpc '@qdrant/js-client-rest': - specifier: workspace:1.5.0 + specifier: workspace:1.6.0 version: link:../js-client-rest typescript: specifier: '>=4.1' From 71791b862f4c43a2606f6fe175507b8d6028ca6e Mon Sep 17 00:00:00 2001 From: Ivan Pleshkov Date: Mon, 9 Oct 2023 08:41:12 +0000 Subject: [PATCH 4/4] update qdrant version in tests --- packages/qdrant-js/scripts/integration-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/qdrant-js/scripts/integration-tests.sh b/packages/qdrant-js/scripts/integration-tests.sh index 336b1bc..7676fcb 100755 --- a/packages/qdrant-js/scripts/integration-tests.sh +++ b/packages/qdrant-js/scripts/integration-tests.sh @@ -9,7 +9,7 @@ function stop_docker() docker stop qdrant_test } -QDRANT_LATEST="v1.5.0" +QDRANT_LATEST="v1.6.0" QDRANT_VERSION=${QDRANT_VERSION:-"$QDRANT_LATEST"} QDRANT_HOST='127.0.0.1:6333'