Skip to content

Commit

Permalink
chore: Regenerated grpc stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
hh-space-invader committed Aug 29, 2024
1 parent 4d739f0 commit 6b91b40
Show file tree
Hide file tree
Showing 9 changed files with 1,732 additions and 432 deletions.
208 changes: 104 additions & 104 deletions qdrant_client/grpc/collections_pb2.py

Large diffs are not rendered by default.

430 changes: 396 additions & 34 deletions qdrant_client/grpc/collections_pb2.pyi

Large diffs are not rendered by default.

300 changes: 160 additions & 140 deletions qdrant_client/grpc/points_pb2.py

Large diffs are not rendered by default.

1,156 changes: 1,009 additions & 147 deletions qdrant_client/grpc/points_pb2.pyi

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions qdrant_client/grpc/points_service_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions qdrant_client/grpc/points_service_pb2_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ def __init__(self, channel):
request_serializer=points__pb2.QueryPointGroups.SerializeToString,
response_deserializer=points__pb2.QueryGroupsResponse.FromString,
)
self.Facet = channel.unary_unary(
'/qdrant.Points/Facet',
request_serializer=points__pb2.FacetCounts.SerializeToString,
response_deserializer=points__pb2.FacetResponse.FromString,
)


class PointsServicer(object):
Expand Down Expand Up @@ -358,6 +363,14 @@ def QueryGroups(self, request, context):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def Facet(self, request, context):
"""
Perform facet counts. For each value in the field, count the number of points that have this value and match the conditions.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')


def add_PointsServicer_to_server(servicer, server):
rpc_method_handlers = {
Expand Down Expand Up @@ -486,6 +499,11 @@ def add_PointsServicer_to_server(servicer, server):
request_deserializer=points__pb2.QueryPointGroups.FromString,
response_serializer=points__pb2.QueryGroupsResponse.SerializeToString,
),
'Facet': grpc.unary_unary_rpc_method_handler(
servicer.Facet,
request_deserializer=points__pb2.FacetCounts.FromString,
response_serializer=points__pb2.FacetResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'qdrant.Points', rpc_method_handlers)
Expand Down Expand Up @@ -920,3 +938,20 @@ def QueryGroups(request,
points__pb2.QueryGroupsResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def Facet(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/qdrant.Points/Facet',
points__pb2.FacetCounts.SerializeToString,
points__pb2.FacetResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
8 changes: 4 additions & 4 deletions qdrant_client/proto/collections.proto
Original file line number Diff line number Diff line change
Expand Up @@ -387,13 +387,13 @@ enum TokenizerType {
}

message KeywordIndexParams {
optional bool is_tenant = 3; // If true - used for tenant optimization.
optional bool on_disk = 4; // If true - store index on disk.
optional bool is_tenant = 1; // If true - used for tenant optimization.
optional bool on_disk = 2; // If true - store index on disk.
}

message IntegerIndexParams {
bool lookup = 1; // If true - support direct lookups.
bool range = 2; // If true - support ranges filters.
optional bool lookup = 1; // If true - support direct lookups.
optional bool range = 2; // If true - support ranges filters.
optional bool is_principal = 3; // If true - use this key to organize storage of the collection data. This option assumes that this key will be used in majority of filtered requests.
optional bool on_disk = 4; // If true - store index on disk.
}
Expand Down
19 changes: 18 additions & 1 deletion qdrant_client/proto/points.proto
Original file line number Diff line number Diff line change
Expand Up @@ -589,13 +589,25 @@ message QueryPointGroups {
optional ShardKeySelector shard_key_selector = 17; // Specify in which shards to look for the points, if not specified - look in all shards
}

message FacetCounts {
string collection_name = 1; // Name of the collection
string key = 2; // Payload key of the facet
optional Filter filter = 3; // Filter conditions - return only those points that satisfy the specified conditions.
optional uint64 limit = 4; // Max number of facets. Default is 10.
optional bool exact = 5; // If true, return exact counts, slower but useful for debugging purposes. Default is false.
optional uint64 timeout = 6; // If set, overrides global timeout setting for this request. Unit is seconds.
optional ReadConsistency read_consistency = 7; // Options for specifying read consistency guarantees
optional ShardKeySelector shard_key_selector = 8; // Specify in which shards to look for the points, if not specified - look in all shards
}

message FacetValue {
oneof variant {
string string_value = 1; // String value from the facet
int64 integer_value = 2; // Integer value from the facet
}
}

message FacetValueHit {
message FacetHit {
FacetValue value = 1; // Value from the facet
uint64 count = 2; // Number of points with this value
}
Expand Down Expand Up @@ -814,6 +826,11 @@ message UpdateBatchResponse {
double time = 2; // Time spent to process
}

message FacetResponse {
repeated FacetHit hits = 1;
double time = 2; // Time spent to process
}

// ---------------------------------------------
// ------------- Filter Conditions -------------
// ---------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions qdrant_client/proto/points_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,8 @@ service Points {
Universally query points in a group fashion. This endpoint covers all capabilities of search, recommend, discover, filters. But also enables hybrid and multi-stage queries.
*/
rpc QueryGroups (QueryPointGroups) returns (QueryGroupsResponse) {}
/*
Perform facet counts. For each value in the field, count the number of points that have this value and match the conditions.
*/
rpc Facet (FacetCounts) returns (FacetResponse) {}
}

0 comments on commit 6b91b40

Please sign in to comment.