diff --git a/grpc/protos/zoekt/webserver/v1/query.pb.go b/grpc/protos/zoekt/webserver/v1/query.pb.go index f70430513..2cd1694d6 100644 --- a/grpc/protos/zoekt/webserver/v1/query.pb.go +++ b/grpc/protos/zoekt/webserver/v1/query.pb.go @@ -157,6 +157,7 @@ type Q struct { // *Q_Or // *Q_Not // *Q_Branch + // *Q_Boost Query isQ_Query `protobuf_oneof:"query"` } @@ -318,6 +319,13 @@ func (x *Q) GetBranch() *Branch { return nil } +func (x *Q) GetBoost() *Boost { + if x, ok := x.GetQuery().(*Q_Boost); ok { + return x.Boost + } + return nil +} + type isQ_Query interface { isQ_Query() } @@ -390,6 +398,10 @@ type Q_Branch struct { Branch *Branch `protobuf:"bytes,17,opt,name=branch,proto3,oneof"` } +type Q_Boost struct { + Boost *Boost `protobuf:"bytes,18,opt,name=boost,proto3,oneof"` +} + func (*Q_RawConfig) isQ_Query() {} func (*Q_Regexp) isQ_Query() {} @@ -424,6 +436,8 @@ func (*Q_Not) isQ_Query() {} func (*Q_Branch) isQ_Query() {} +func (*Q_Boost) isQ_Query() {} + // RawConfig filters repositories based on their encoded RawConfig map. type RawConfig struct { state protoimpl.MessageState @@ -1315,13 +1329,69 @@ func (x *Branch) GetExact() bool { return false } +// Boost multiplies the score of its child by the boost factor. +type Boost struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Child *Q `protobuf:"bytes,1,opt,name=child,proto3" json:"child,omitempty"` + Boost float64 `protobuf:"fixed64,2,opt,name=boost,proto3" json:"boost,omitempty"` +} + +func (x *Boost) Reset() { + *x = Boost{} + if protoimpl.UnsafeEnabled { + mi := &file_zoekt_webserver_v1_query_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Boost) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Boost) ProtoMessage() {} + +func (x *Boost) ProtoReflect() protoreflect.Message { + mi := &file_zoekt_webserver_v1_query_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Boost.ProtoReflect.Descriptor instead. +func (*Boost) Descriptor() ([]byte, []int) { + return file_zoekt_webserver_v1_query_proto_rawDescGZIP(), []int{18} +} + +func (x *Boost) GetChild() *Q { + if x != nil { + return x.Child + } + return nil +} + +func (x *Boost) GetBoost() float64 { + if x != nil { + return x.Boost + } + return 0 +} + var File_zoekt_webserver_v1_query_proto protoreflect.FileDescriptor var file_zoekt_webserver_v1_query_proto_rawDesc = []byte{ 0x0a, 0x1e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2f, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x22, 0xaf, 0x07, 0x0a, 0x01, 0x51, 0x12, 0x3e, 0x0a, 0x0a, 0x72, 0x61, + 0x72, 0x2e, 0x76, 0x31, 0x22, 0xe2, 0x07, 0x0a, 0x01, 0x51, 0x12, 0x3e, 0x0a, 0x0a, 0x72, 0x61, 0x77, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x77, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, @@ -1379,100 +1449,108 @@ var file_zoekt_webserver_v1_query_proto_rawDesc = []byte{ 0x48, 0x00, 0x52, 0x03, 0x6e, 0x6f, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, - 0x6e, 0x63, 0x68, 0x48, 0x00, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x42, 0x07, 0x0a, - 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0xef, 0x01, 0x0a, 0x09, 0x52, 0x61, 0x77, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x38, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x77, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x22, 0xa7, - 0x01, 0x0a, 0x04, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x4c, 0x41, 0x47, 0x5f, - 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x4f, 0x4e, - 0x4c, 0x59, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x46, - 0x4c, 0x41, 0x47, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x5f, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, - 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x5f, - 0x46, 0x4f, 0x52, 0x4b, 0x53, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x4c, 0x41, 0x47, 0x5f, - 0x4e, 0x4f, 0x5f, 0x46, 0x4f, 0x52, 0x4b, 0x53, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x4c, - 0x41, 0x47, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x5f, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, - 0x10, 0x10, 0x12, 0x14, 0x0a, 0x10, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x4e, 0x4f, 0x5f, 0x41, 0x52, - 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, 0x20, 0x22, 0x7e, 0x0a, 0x06, 0x52, 0x65, 0x67, 0x65, - 0x78, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, - 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, - 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, - 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x63, 0x61, 0x73, 0x65, 0x53, - 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x22, 0x33, 0x0a, 0x06, 0x53, 0x79, 0x6d, 0x62, - 0x6f, 0x6c, 0x12, 0x29, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x15, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x52, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0x26, 0x0a, - 0x08, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, - 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, - 0x67, 0x75, 0x61, 0x67, 0x65, 0x22, 0x1e, 0x0a, 0x04, 0x52, 0x65, 0x70, 0x6f, 0x12, 0x16, 0x0a, - 0x06, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, - 0x65, 0x67, 0x65, 0x78, 0x70, 0x22, 0x24, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x52, 0x65, 0x67, - 0x65, 0x78, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x22, 0x44, 0x0a, 0x0d, 0x42, - 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x12, 0x33, 0x0a, 0x04, - 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x7a, 0x6f, 0x65, - 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x52, 0x04, 0x6c, 0x69, 0x73, - 0x74, 0x22, 0x3b, 0x0a, 0x0b, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x73, - 0x12, 0x16, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x70, 0x6f, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x22, 0x1f, - 0x0a, 0x07, 0x52, 0x65, 0x70, 0x6f, 0x49, 0x64, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x70, - 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x22, - 0x79, 0x0a, 0x07, 0x52, 0x65, 0x70, 0x6f, 0x53, 0x65, 0x74, 0x12, 0x36, 0x0a, 0x03, 0x73, 0x65, - 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, - 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, - 0x6f, 0x53, 0x65, 0x74, 0x2e, 0x53, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x73, - 0x65, 0x74, 0x1a, 0x36, 0x0a, 0x08, 0x53, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x1f, 0x0a, 0x0b, 0x46, 0x69, - 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x74, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x73, 0x65, 0x74, 0x22, 0xc4, 0x01, 0x0a, 0x04, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x01, 0x20, + 0x6e, 0x63, 0x68, 0x48, 0x00, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x31, 0x0a, + 0x05, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x7a, + 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x73, 0x74, + 0x42, 0x07, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0xef, 0x01, 0x0a, 0x09, 0x52, 0x61, + 0x77, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x38, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, + 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x77, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, + 0x73, 0x22, 0xa7, 0x01, 0x0a, 0x04, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x4c, + 0x41, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x46, 0x4c, 0x41, 0x47, + 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x01, 0x12, 0x15, + 0x0a, 0x11, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x5f, 0x50, 0x52, 0x49, 0x56, + 0x41, 0x54, 0x45, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x4f, 0x4e, + 0x4c, 0x59, 0x5f, 0x46, 0x4f, 0x52, 0x4b, 0x53, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x4c, + 0x41, 0x47, 0x5f, 0x4e, 0x4f, 0x5f, 0x46, 0x4f, 0x52, 0x4b, 0x53, 0x10, 0x08, 0x12, 0x16, 0x0a, + 0x12, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x5f, 0x41, 0x52, 0x43, 0x48, 0x49, + 0x56, 0x45, 0x44, 0x10, 0x10, 0x12, 0x14, 0x0a, 0x10, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x4e, 0x4f, + 0x5f, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, 0x20, 0x22, 0x7e, 0x0a, 0x06, 0x52, + 0x65, 0x67, 0x65, 0x78, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x12, 0x1b, 0x0a, + 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x6e, + 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x63, 0x61, + 0x73, 0x65, 0x53, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x22, 0x33, 0x0a, 0x06, 0x53, + 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x29, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x52, 0x05, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x12, 0x31, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x1d, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x22, 0x5c, 0x0a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x18, - 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4b, 0x49, - 0x4e, 0x44, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x10, 0x01, 0x12, - 0x12, 0x0a, 0x0e, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x4e, 0x41, 0x4d, - 0x45, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x50, 0x4f, - 0x10, 0x03, 0x22, 0x83, 0x01, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x61, - 0x73, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0d, 0x63, 0x61, 0x73, 0x65, 0x53, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, - 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x38, 0x0a, 0x03, 0x41, 0x6e, 0x64, 0x12, - 0x31, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, - 0x65, 0x6e, 0x22, 0x37, 0x0a, 0x02, 0x4f, 0x72, 0x12, 0x31, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x7a, 0x6f, 0x65, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x52, 0x04, 0x65, 0x78, 0x70, 0x72, + 0x22, 0x26, 0x0a, 0x08, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x22, 0x1e, 0x0a, 0x04, 0x52, 0x65, 0x70, 0x6f, + 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x22, 0x24, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6f, + 0x52, 0x65, 0x67, 0x65, 0x78, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x22, 0x44, + 0x0a, 0x0d, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x12, + 0x33, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x52, 0x04, + 0x6c, 0x69, 0x73, 0x74, 0x22, 0x3b, 0x0a, 0x0b, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x72, + 0x65, 0x70, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x72, 0x65, 0x70, 0x6f, + 0x73, 0x22, 0x1f, 0x0a, 0x07, 0x52, 0x65, 0x70, 0x6f, 0x49, 0x64, 0x73, 0x12, 0x14, 0x0a, 0x05, + 0x72, 0x65, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x72, 0x65, 0x70, + 0x6f, 0x73, 0x22, 0x79, 0x0a, 0x07, 0x52, 0x65, 0x70, 0x6f, 0x53, 0x65, 0x74, 0x12, 0x36, 0x0a, + 0x03, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x51, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x32, 0x0a, 0x03, 0x4e, - 0x6f, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x52, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x22, - 0x38, 0x0a, 0x06, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, - 0x74, 0x65, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, - 0x61, 0x70, 0x68, 0x2f, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2f, 0x77, 0x65, 0x62, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x70, 0x6f, 0x53, 0x65, 0x74, 0x2e, 0x53, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x03, 0x73, 0x65, 0x74, 0x1a, 0x36, 0x0a, 0x08, 0x53, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x1f, 0x0a, + 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, + 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x73, 0x65, 0x74, 0x22, 0xc4, + 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, + 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x52, 0x05, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x12, 0x31, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x4b, 0x69, 0x6e, + 0x64, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x5c, 0x0a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x12, + 0x1c, 0x0a, 0x18, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, + 0x0f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, + 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x5f, + 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x52, + 0x45, 0x50, 0x4f, 0x10, 0x03, 0x22, 0x83, 0x01, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x25, 0x0a, + 0x0e, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x63, 0x61, 0x73, 0x65, 0x53, 0x65, 0x6e, 0x73, 0x69, + 0x74, 0x69, 0x76, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x38, 0x0a, 0x03, 0x41, + 0x6e, 0x64, 0x12, 0x31, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x52, 0x08, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x37, 0x0a, 0x02, 0x4f, 0x72, 0x12, 0x31, 0x0a, 0x08, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x32, + 0x0a, 0x03, 0x4e, 0x6f, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x52, 0x05, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x22, 0x38, 0x0a, 0x06, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x18, 0x0a, 0x07, + 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x22, 0x4a, 0x0a, 0x05, + 0x42, 0x6f, 0x6f, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x52, 0x05, 0x63, 0x68, 0x69, + 0x6c, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x01, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, + 0x70, 0x68, 0x2f, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2f, 0x77, 0x65, 0x62, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1488,7 +1566,7 @@ func file_zoekt_webserver_v1_query_proto_rawDescGZIP() []byte { } var file_zoekt_webserver_v1_query_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_zoekt_webserver_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 19) +var file_zoekt_webserver_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_zoekt_webserver_v1_query_proto_goTypes = []interface{}{ (RawConfig_Flag)(0), // 0: zoekt.webserver.v1.RawConfig.Flag (Type_Kind)(0), // 1: zoekt.webserver.v1.Type.Kind @@ -1510,7 +1588,8 @@ var file_zoekt_webserver_v1_query_proto_goTypes = []interface{}{ (*Or)(nil), // 17: zoekt.webserver.v1.Or (*Not)(nil), // 18: zoekt.webserver.v1.Not (*Branch)(nil), // 19: zoekt.webserver.v1.Branch - nil, // 20: zoekt.webserver.v1.RepoSet.SetEntry + (*Boost)(nil), // 20: zoekt.webserver.v1.Boost + nil, // 21: zoekt.webserver.v1.RepoSet.SetEntry } var file_zoekt_webserver_v1_query_proto_depIdxs = []int32{ 3, // 0: zoekt.webserver.v1.Q.raw_config:type_name -> zoekt.webserver.v1.RawConfig @@ -1529,20 +1608,22 @@ var file_zoekt_webserver_v1_query_proto_depIdxs = []int32{ 17, // 13: zoekt.webserver.v1.Q.or:type_name -> zoekt.webserver.v1.Or 18, // 14: zoekt.webserver.v1.Q.not:type_name -> zoekt.webserver.v1.Not 19, // 15: zoekt.webserver.v1.Q.branch:type_name -> zoekt.webserver.v1.Branch - 0, // 16: zoekt.webserver.v1.RawConfig.flags:type_name -> zoekt.webserver.v1.RawConfig.Flag - 2, // 17: zoekt.webserver.v1.Symbol.expr:type_name -> zoekt.webserver.v1.Q - 10, // 18: zoekt.webserver.v1.BranchesRepos.list:type_name -> zoekt.webserver.v1.BranchRepos - 20, // 19: zoekt.webserver.v1.RepoSet.set:type_name -> zoekt.webserver.v1.RepoSet.SetEntry - 2, // 20: zoekt.webserver.v1.Type.child:type_name -> zoekt.webserver.v1.Q - 1, // 21: zoekt.webserver.v1.Type.type:type_name -> zoekt.webserver.v1.Type.Kind - 2, // 22: zoekt.webserver.v1.And.children:type_name -> zoekt.webserver.v1.Q - 2, // 23: zoekt.webserver.v1.Or.children:type_name -> zoekt.webserver.v1.Q - 2, // 24: zoekt.webserver.v1.Not.child:type_name -> zoekt.webserver.v1.Q - 25, // [25:25] is the sub-list for method output_type - 25, // [25:25] is the sub-list for method input_type - 25, // [25:25] is the sub-list for extension type_name - 25, // [25:25] is the sub-list for extension extendee - 0, // [0:25] is the sub-list for field type_name + 20, // 16: zoekt.webserver.v1.Q.boost:type_name -> zoekt.webserver.v1.Boost + 0, // 17: zoekt.webserver.v1.RawConfig.flags:type_name -> zoekt.webserver.v1.RawConfig.Flag + 2, // 18: zoekt.webserver.v1.Symbol.expr:type_name -> zoekt.webserver.v1.Q + 10, // 19: zoekt.webserver.v1.BranchesRepos.list:type_name -> zoekt.webserver.v1.BranchRepos + 21, // 20: zoekt.webserver.v1.RepoSet.set:type_name -> zoekt.webserver.v1.RepoSet.SetEntry + 2, // 21: zoekt.webserver.v1.Type.child:type_name -> zoekt.webserver.v1.Q + 1, // 22: zoekt.webserver.v1.Type.type:type_name -> zoekt.webserver.v1.Type.Kind + 2, // 23: zoekt.webserver.v1.And.children:type_name -> zoekt.webserver.v1.Q + 2, // 24: zoekt.webserver.v1.Or.children:type_name -> zoekt.webserver.v1.Q + 2, // 25: zoekt.webserver.v1.Not.child:type_name -> zoekt.webserver.v1.Q + 2, // 26: zoekt.webserver.v1.Boost.child:type_name -> zoekt.webserver.v1.Q + 27, // [27:27] is the sub-list for method output_type + 27, // [27:27] is the sub-list for method input_type + 27, // [27:27] is the sub-list for extension type_name + 27, // [27:27] is the sub-list for extension extendee + 0, // [0:27] is the sub-list for field type_name } func init() { file_zoekt_webserver_v1_query_proto_init() } @@ -1767,6 +1848,18 @@ func file_zoekt_webserver_v1_query_proto_init() { return nil } } + file_zoekt_webserver_v1_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Boost); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_zoekt_webserver_v1_query_proto_msgTypes[0].OneofWrappers = []interface{}{ (*Q_RawConfig)(nil), @@ -1786,6 +1879,7 @@ func file_zoekt_webserver_v1_query_proto_init() { (*Q_Or)(nil), (*Q_Not)(nil), (*Q_Branch)(nil), + (*Q_Boost)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -1793,7 +1887,7 @@ func file_zoekt_webserver_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_zoekt_webserver_v1_query_proto_rawDesc, NumEnums: 2, - NumMessages: 19, + NumMessages: 20, NumExtensions: 0, NumServices: 0, }, diff --git a/grpc/protos/zoekt/webserver/v1/query.proto b/grpc/protos/zoekt/webserver/v1/query.proto index 4ed08af15..308ad461e 100644 --- a/grpc/protos/zoekt/webserver/v1/query.proto +++ b/grpc/protos/zoekt/webserver/v1/query.proto @@ -23,6 +23,7 @@ message Q { Or or = 15; Not not = 16; Branch branch = 17; + Boost boost = 18; } } @@ -141,3 +142,9 @@ message Branch { // exact is true if we want to Pattern to equal branch. bool exact = 2; } + +// Boost multiplies the score of its child by the boost factor. +message Boost { + Q child = 1; + double boost = 2; +} diff --git a/query/query_proto.go b/query/query_proto.go index 63f8a9dd4..f02a6fcd9 100644 --- a/query/query_proto.go +++ b/query/query_proto.go @@ -6,6 +6,7 @@ import ( "github.com/RoaringBitmap/roaring" "github.com/grafana/regexp" + proto "github.com/sourcegraph/zoekt/grpc/protos/zoekt/webserver/v1" ) @@ -45,6 +46,8 @@ func QToProto(q Q) *proto.Q { return &proto.Q{Query: &proto.Q_Not{Not: v.ToProto()}} case *Branch: return &proto.Q{Query: &proto.Q_Branch{Branch: v.ToProto()}} + case *Boost: + return &proto.Q{Query: &proto.Q_Boost{Boost: v.ToProto()}} default: // The following nodes do not have a proto representation: // - GobCache: only needed for Gob encoding @@ -89,6 +92,8 @@ func QFromProto(p *proto.Q) (Q, error) { return NotFromProto(v.Not) case *proto.Q_Branch: return BranchFromProto(v.Branch), nil + case *proto.Q_Boost: + return BoostFromProto(v.Boost) default: panic(fmt.Sprintf("unknown query node %T", p.Query)) } @@ -360,6 +365,24 @@ func (q *Or) ToProto() *proto.Or { } } +func BoostFromProto(p *proto.Boost) (*Boost, error) { + child, err := QFromProto(p.GetChild()) + if err != nil { + return nil, err + } + return &Boost{ + Child: child, + Boost: p.GetBoost(), + }, nil +} + +func (q *Boost) ToProto() *proto.Boost { + return &proto.Boost{ + Child: QToProto(q.Child), + Boost: q.Boost, + } +} + func NotFromProto(p *proto.Not) (*Not, error) { child, err := QFromProto(p.GetChild()) if err != nil { diff --git a/query/query_proto_test.go b/query/query_proto_test.go index c5f0065fe..e1e8b8582 100644 --- a/query/query_proto_test.go +++ b/query/query_proto_test.go @@ -73,6 +73,20 @@ func TestQueryRoundtrip(t *testing.T) { &Not{ Child: &Language{Language: "go"}, }, + &Boost{ + Child: &Or{ + Children: []Q{ + &And{ + Children: []Q{ + &Substring{Pattern: "foo"}, + &Substring{Pattern: "bar"}, + }, + }, + &Substring{Pattern: "foo bar"}, + }, + }, + Boost: 20, + }, } for _, q := range testCases {