fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

add query.Boost to protobuf (#731)

This adds the new Boost query atom to the protobuf defintion.

Co-authored-by: Keegan Carruthers-Smith <keegan.csmith@gmail.com>

+248 -110
+204 -110
grpc/protos/zoekt/webserver/v1/query.pb.go
··· 157 157 // *Q_Or 158 158 // *Q_Not 159 159 // *Q_Branch 160 + // *Q_Boost 160 161 Query isQ_Query `protobuf_oneof:"query"` 161 162 } 162 163 ··· 318 319 return nil 319 320 } 320 321 322 + func (x *Q) GetBoost() *Boost { 323 + if x, ok := x.GetQuery().(*Q_Boost); ok { 324 + return x.Boost 325 + } 326 + return nil 327 + } 328 + 321 329 type isQ_Query interface { 322 330 isQ_Query() 323 331 } ··· 390 398 Branch *Branch `protobuf:"bytes,17,opt,name=branch,proto3,oneof"` 391 399 } 392 400 401 + type Q_Boost struct { 402 + Boost *Boost `protobuf:"bytes,18,opt,name=boost,proto3,oneof"` 403 + } 404 + 393 405 func (*Q_RawConfig) isQ_Query() {} 394 406 395 407 func (*Q_Regexp) isQ_Query() {} ··· 423 435 func (*Q_Not) isQ_Query() {} 424 436 425 437 func (*Q_Branch) isQ_Query() {} 438 + 439 + func (*Q_Boost) isQ_Query() {} 426 440 427 441 // RawConfig filters repositories based on their encoded RawConfig map. 428 442 type RawConfig struct { ··· 1315 1329 return false 1316 1330 } 1317 1331 1332 + // Boost multiplies the score of its child by the boost factor. 1333 + type Boost struct { 1334 + state protoimpl.MessageState 1335 + sizeCache protoimpl.SizeCache 1336 + unknownFields protoimpl.UnknownFields 1337 + 1338 + Child *Q `protobuf:"bytes,1,opt,name=child,proto3" json:"child,omitempty"` 1339 + Boost float64 `protobuf:"fixed64,2,opt,name=boost,proto3" json:"boost,omitempty"` 1340 + } 1341 + 1342 + func (x *Boost) Reset() { 1343 + *x = Boost{} 1344 + if protoimpl.UnsafeEnabled { 1345 + mi := &file_zoekt_webserver_v1_query_proto_msgTypes[18] 1346 + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 1347 + ms.StoreMessageInfo(mi) 1348 + } 1349 + } 1350 + 1351 + func (x *Boost) String() string { 1352 + return protoimpl.X.MessageStringOf(x) 1353 + } 1354 + 1355 + func (*Boost) ProtoMessage() {} 1356 + 1357 + func (x *Boost) ProtoReflect() protoreflect.Message { 1358 + mi := &file_zoekt_webserver_v1_query_proto_msgTypes[18] 1359 + if protoimpl.UnsafeEnabled && x != nil { 1360 + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 1361 + if ms.LoadMessageInfo() == nil { 1362 + ms.StoreMessageInfo(mi) 1363 + } 1364 + return ms 1365 + } 1366 + return mi.MessageOf(x) 1367 + } 1368 + 1369 + // Deprecated: Use Boost.ProtoReflect.Descriptor instead. 1370 + func (*Boost) Descriptor() ([]byte, []int) { 1371 + return file_zoekt_webserver_v1_query_proto_rawDescGZIP(), []int{18} 1372 + } 1373 + 1374 + func (x *Boost) GetChild() *Q { 1375 + if x != nil { 1376 + return x.Child 1377 + } 1378 + return nil 1379 + } 1380 + 1381 + func (x *Boost) GetBoost() float64 { 1382 + if x != nil { 1383 + return x.Boost 1384 + } 1385 + return 0 1386 + } 1387 + 1318 1388 var File_zoekt_webserver_v1_query_proto protoreflect.FileDescriptor 1319 1389 1320 1390 var file_zoekt_webserver_v1_query_proto_rawDesc = []byte{ 1321 1391 0x0a, 0x1e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2f, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 1322 1392 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 1323 1393 0x12, 0x12, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 1324 - 0x72, 0x2e, 0x76, 0x31, 0x22, 0xaf, 0x07, 0x0a, 0x01, 0x51, 0x12, 0x3e, 0x0a, 0x0a, 0x72, 0x61, 1394 + 0x72, 0x2e, 0x76, 0x31, 0x22, 0xe2, 0x07, 0x0a, 0x01, 0x51, 0x12, 0x3e, 0x0a, 0x0a, 0x72, 0x61, 1325 1395 0x77, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 1326 1396 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 1327 1397 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x77, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, ··· 1379 1449 0x48, 0x00, 0x52, 0x03, 0x6e, 0x6f, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 1380 1450 0x68, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 1381 1451 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 1382 - 0x6e, 0x63, 0x68, 0x48, 0x00, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x42, 0x07, 0x0a, 1383 - 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0xef, 0x01, 0x0a, 0x09, 0x52, 0x61, 0x77, 0x43, 0x6f, 1384 - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x38, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 1385 - 0x03, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 1386 - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x77, 0x43, 0x6f, 0x6e, 0x66, 1387 - 0x69, 0x67, 0x2e, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x22, 0xa7, 1388 - 0x01, 0x0a, 0x04, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x4c, 0x41, 0x47, 0x5f, 1389 - 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 1390 - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x4f, 0x4e, 1391 - 0x4c, 0x59, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x46, 1392 - 0x4c, 0x41, 0x47, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x5f, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 1393 - 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x5f, 1394 - 0x46, 0x4f, 0x52, 0x4b, 0x53, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x4c, 0x41, 0x47, 0x5f, 1395 - 0x4e, 0x4f, 0x5f, 0x46, 0x4f, 0x52, 0x4b, 0x53, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x4c, 1396 - 0x41, 0x47, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x5f, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 1397 - 0x10, 0x10, 0x12, 0x14, 0x0a, 0x10, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x4e, 0x4f, 0x5f, 0x41, 0x52, 1398 - 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, 0x20, 0x22, 0x7e, 0x0a, 0x06, 0x52, 0x65, 0x67, 0x65, 1399 - 0x78, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x18, 0x01, 0x20, 0x01, 1400 - 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 1401 - 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 1402 - 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 1403 - 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 1404 - 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 1405 - 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x63, 0x61, 0x73, 0x65, 0x53, 1406 - 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x22, 0x33, 0x0a, 0x06, 0x53, 0x79, 0x6d, 0x62, 1407 - 0x6f, 0x6c, 0x12, 0x29, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 1408 - 0x32, 0x15, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 1409 - 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x52, 0x04, 0x65, 0x78, 0x70, 0x72, 0x22, 0x26, 0x0a, 1410 - 0x08, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 1411 - 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, 1412 - 0x67, 0x75, 0x61, 0x67, 0x65, 0x22, 0x1e, 0x0a, 0x04, 0x52, 0x65, 0x70, 0x6f, 0x12, 0x16, 0x0a, 1413 - 0x06, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 1414 - 0x65, 0x67, 0x65, 0x78, 0x70, 0x22, 0x24, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x52, 0x65, 0x67, 1415 - 0x65, 0x78, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x18, 0x01, 0x20, 1416 - 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x22, 0x44, 0x0a, 0x0d, 0x42, 1417 - 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x12, 0x33, 0x0a, 0x04, 1418 - 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x7a, 0x6f, 0x65, 1419 - 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 1420 - 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x52, 0x04, 0x6c, 0x69, 0x73, 1421 - 0x74, 0x22, 0x3b, 0x0a, 0x0b, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x73, 1422 - 0x12, 0x16, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 1423 - 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x70, 0x6f, 1424 - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x22, 0x1f, 1425 - 0x0a, 0x07, 0x52, 0x65, 0x70, 0x6f, 0x49, 0x64, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x70, 1426 - 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x22, 1427 - 0x79, 0x0a, 0x07, 0x52, 0x65, 0x70, 0x6f, 0x53, 0x65, 0x74, 0x12, 0x36, 0x0a, 0x03, 0x73, 0x65, 1428 - 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 1429 - 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 1430 - 0x6f, 0x53, 0x65, 0x74, 0x2e, 0x53, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x73, 1431 - 0x65, 0x74, 0x1a, 0x36, 0x0a, 0x08, 0x53, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 1432 - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 1433 - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 1434 - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x1f, 0x0a, 0x0b, 0x46, 0x69, 1435 - 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x74, 1436 - 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x73, 0x65, 0x74, 0x22, 0xc4, 0x01, 0x0a, 0x04, 1437 - 0x54, 0x79, 0x70, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x01, 0x20, 1452 + 0x6e, 0x63, 0x68, 0x48, 0x00, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x31, 0x0a, 1453 + 0x05, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x7a, 1454 + 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 1455 + 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x73, 0x74, 1456 + 0x42, 0x07, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0xef, 0x01, 0x0a, 0x09, 0x52, 0x61, 1457 + 0x77, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x38, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 1458 + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 1459 + 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x77, 0x43, 1460 + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 1461 + 0x73, 0x22, 0xa7, 0x01, 0x0a, 0x04, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x4c, 1462 + 0x41, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 1463 + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x46, 0x4c, 0x41, 0x47, 1464 + 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x01, 0x12, 0x15, 1465 + 0x0a, 0x11, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x5f, 0x50, 0x52, 0x49, 0x56, 1466 + 0x41, 0x54, 0x45, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x4f, 0x4e, 1467 + 0x4c, 0x59, 0x5f, 0x46, 0x4f, 0x52, 0x4b, 0x53, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x4c, 1468 + 0x41, 0x47, 0x5f, 0x4e, 0x4f, 0x5f, 0x46, 0x4f, 0x52, 0x4b, 0x53, 0x10, 0x08, 0x12, 0x16, 0x0a, 1469 + 0x12, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x5f, 0x41, 0x52, 0x43, 0x48, 0x49, 1470 + 0x56, 0x45, 0x44, 0x10, 0x10, 0x12, 0x14, 0x0a, 0x10, 0x46, 0x4c, 0x41, 0x47, 0x5f, 0x4e, 0x4f, 1471 + 0x5f, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, 0x20, 0x22, 0x7e, 0x0a, 0x06, 0x52, 1472 + 0x65, 0x67, 0x65, 0x78, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x18, 1473 + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x12, 0x1b, 0x0a, 1474 + 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 1475 + 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 1476 + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x63, 0x6f, 0x6e, 1477 + 0x74, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x6e, 1478 + 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x63, 0x61, 1479 + 0x73, 0x65, 0x53, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x22, 0x33, 0x0a, 0x06, 0x53, 1480 + 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x29, 0x0a, 0x04, 0x65, 0x78, 0x70, 0x72, 0x18, 0x01, 0x20, 1438 1481 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 1439 - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x52, 0x05, 0x63, 0x68, 0x69, 0x6c, 1440 - 0x64, 0x12, 0x31, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 1441 - 0x1d, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 1442 - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 1443 - 0x74, 0x79, 0x70, 0x65, 0x22, 0x5c, 0x0a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x18, 1444 - 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 1445 - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4b, 0x49, 1446 - 0x4e, 0x44, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x10, 0x01, 0x12, 1447 - 0x12, 0x0a, 0x0e, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x4e, 0x41, 0x4d, 1448 - 0x45, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x50, 0x4f, 1449 - 0x10, 0x03, 0x22, 0x83, 0x01, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 1450 - 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 1451 - 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x61, 1452 - 0x73, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 1453 - 0x28, 0x08, 0x52, 0x0d, 0x63, 0x61, 0x73, 0x65, 0x53, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 1454 - 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 1455 - 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 1456 - 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 1457 - 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x38, 0x0a, 0x03, 0x41, 0x6e, 0x64, 0x12, 1458 - 0x31, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 1459 - 0x0b, 0x32, 0x15, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 1460 - 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 1461 - 0x65, 0x6e, 0x22, 0x37, 0x0a, 0x02, 0x4f, 0x72, 0x12, 0x31, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 1462 - 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x7a, 0x6f, 0x65, 1482 + 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x52, 0x04, 0x65, 0x78, 0x70, 0x72, 1483 + 0x22, 0x26, 0x0a, 0x08, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 1484 + 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 1485 + 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x22, 0x1e, 0x0a, 0x04, 0x52, 0x65, 0x70, 0x6f, 1486 + 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 1487 + 0x52, 0x06, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x22, 0x24, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6f, 1488 + 0x52, 0x65, 0x67, 0x65, 0x78, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 1489 + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x65, 0x78, 0x70, 0x22, 0x44, 1490 + 0x0a, 0x0d, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x12, 1491 + 0x33, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 1492 + 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 1493 + 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x52, 0x04, 1494 + 0x6c, 0x69, 0x73, 0x74, 0x22, 0x3b, 0x0a, 0x0b, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 1495 + 0x70, 0x6f, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x01, 0x20, 1496 + 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x72, 1497 + 0x65, 0x70, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x72, 0x65, 0x70, 0x6f, 1498 + 0x73, 0x22, 0x1f, 0x0a, 0x07, 0x52, 0x65, 0x70, 0x6f, 0x49, 0x64, 0x73, 0x12, 0x14, 0x0a, 0x05, 1499 + 0x72, 0x65, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x72, 0x65, 0x70, 1500 + 0x6f, 0x73, 0x22, 0x79, 0x0a, 0x07, 0x52, 0x65, 0x70, 0x6f, 0x53, 0x65, 0x74, 0x12, 0x36, 0x0a, 1501 + 0x03, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x7a, 0x6f, 0x65, 1463 1502 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 1464 - 0x51, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x32, 0x0a, 0x03, 0x4e, 1465 - 0x6f, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 1466 - 0x0b, 0x32, 0x15, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 1467 - 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x52, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x22, 1468 - 0x38, 0x0a, 0x06, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 1469 - 0x74, 0x65, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 1470 - 0x65, 0x72, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 1471 - 0x28, 0x08, 0x52, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 1472 - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 1473 - 0x61, 0x70, 0x68, 0x2f, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 1474 - 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2f, 0x77, 0x65, 0x62, 0x73, 1475 - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 1503 + 0x52, 0x65, 0x70, 0x6f, 0x53, 0x65, 0x74, 0x2e, 0x53, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 1504 + 0x52, 0x03, 0x73, 0x65, 0x74, 0x1a, 0x36, 0x0a, 0x08, 0x53, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, 1505 + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 1506 + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 1507 + 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x1f, 0x0a, 1508 + 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 1509 + 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x73, 0x65, 0x74, 0x22, 0xc4, 1510 + 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 1511 + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 1512 + 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x52, 0x05, 0x63, 1513 + 0x68, 0x69, 0x6c, 0x64, 0x12, 0x31, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 1514 + 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x65, 1515 + 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x4b, 0x69, 0x6e, 1516 + 0x64, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x5c, 0x0a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x12, 1517 + 0x1c, 0x0a, 0x18, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 1518 + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 1519 + 0x0f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 1520 + 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 1521 + 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x52, 1522 + 0x45, 0x50, 0x4f, 0x10, 0x03, 0x22, 0x83, 0x01, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x74, 0x72, 1523 + 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x01, 1524 + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x25, 0x0a, 1525 + 0x0e, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, 1526 + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x63, 0x61, 0x73, 0x65, 0x53, 0x65, 0x6e, 0x73, 0x69, 1527 + 0x74, 0x69, 0x76, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 1528 + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 1529 + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 1530 + 0x28, 0x08, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x38, 0x0a, 0x03, 0x41, 1531 + 0x6e, 0x64, 0x12, 0x31, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 1532 + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 1533 + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x52, 0x08, 0x63, 0x68, 0x69, 1534 + 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x37, 0x0a, 0x02, 0x4f, 0x72, 0x12, 0x31, 0x0a, 0x08, 0x63, 1535 + 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 1536 + 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 1537 + 0x76, 0x31, 0x2e, 0x51, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x32, 1538 + 0x0a, 0x03, 0x4e, 0x6f, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x01, 1539 + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 1540 + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x52, 0x05, 0x63, 0x68, 0x69, 1541 + 0x6c, 0x64, 0x22, 0x38, 0x0a, 0x06, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x18, 0x0a, 0x07, 1542 + 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 1543 + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x18, 1544 + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x22, 0x4a, 0x0a, 0x05, 1545 + 0x42, 0x6f, 0x6f, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x01, 1546 + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2e, 0x77, 0x65, 0x62, 1547 + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x52, 0x05, 0x63, 0x68, 0x69, 1548 + 0x6c, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 1549 + 0x01, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x73, 0x74, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 1550 + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x67, 0x72, 0x61, 1551 + 0x70, 0x68, 0x2f, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x72, 1552 + 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x7a, 0x6f, 0x65, 0x6b, 0x74, 0x2f, 0x77, 0x65, 0x62, 0x73, 0x65, 1553 + 0x72, 0x76, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 1476 1554 } 1477 1555 1478 1556 var ( ··· 1488 1566 } 1489 1567 1490 1568 var file_zoekt_webserver_v1_query_proto_enumTypes = make([]protoimpl.EnumInfo, 2) 1491 - var file_zoekt_webserver_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 19) 1569 + var file_zoekt_webserver_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 20) 1492 1570 var file_zoekt_webserver_v1_query_proto_goTypes = []interface{}{ 1493 1571 (RawConfig_Flag)(0), // 0: zoekt.webserver.v1.RawConfig.Flag 1494 1572 (Type_Kind)(0), // 1: zoekt.webserver.v1.Type.Kind ··· 1510 1588 (*Or)(nil), // 17: zoekt.webserver.v1.Or 1511 1589 (*Not)(nil), // 18: zoekt.webserver.v1.Not 1512 1590 (*Branch)(nil), // 19: zoekt.webserver.v1.Branch 1513 - nil, // 20: zoekt.webserver.v1.RepoSet.SetEntry 1591 + (*Boost)(nil), // 20: zoekt.webserver.v1.Boost 1592 + nil, // 21: zoekt.webserver.v1.RepoSet.SetEntry 1514 1593 } 1515 1594 var file_zoekt_webserver_v1_query_proto_depIdxs = []int32{ 1516 1595 3, // 0: zoekt.webserver.v1.Q.raw_config:type_name -> zoekt.webserver.v1.RawConfig ··· 1529 1608 17, // 13: zoekt.webserver.v1.Q.or:type_name -> zoekt.webserver.v1.Or 1530 1609 18, // 14: zoekt.webserver.v1.Q.not:type_name -> zoekt.webserver.v1.Not 1531 1610 19, // 15: zoekt.webserver.v1.Q.branch:type_name -> zoekt.webserver.v1.Branch 1532 - 0, // 16: zoekt.webserver.v1.RawConfig.flags:type_name -> zoekt.webserver.v1.RawConfig.Flag 1533 - 2, // 17: zoekt.webserver.v1.Symbol.expr:type_name -> zoekt.webserver.v1.Q 1534 - 10, // 18: zoekt.webserver.v1.BranchesRepos.list:type_name -> zoekt.webserver.v1.BranchRepos 1535 - 20, // 19: zoekt.webserver.v1.RepoSet.set:type_name -> zoekt.webserver.v1.RepoSet.SetEntry 1536 - 2, // 20: zoekt.webserver.v1.Type.child:type_name -> zoekt.webserver.v1.Q 1537 - 1, // 21: zoekt.webserver.v1.Type.type:type_name -> zoekt.webserver.v1.Type.Kind 1538 - 2, // 22: zoekt.webserver.v1.And.children:type_name -> zoekt.webserver.v1.Q 1539 - 2, // 23: zoekt.webserver.v1.Or.children:type_name -> zoekt.webserver.v1.Q 1540 - 2, // 24: zoekt.webserver.v1.Not.child:type_name -> zoekt.webserver.v1.Q 1541 - 25, // [25:25] is the sub-list for method output_type 1542 - 25, // [25:25] is the sub-list for method input_type 1543 - 25, // [25:25] is the sub-list for extension type_name 1544 - 25, // [25:25] is the sub-list for extension extendee 1545 - 0, // [0:25] is the sub-list for field type_name 1611 + 20, // 16: zoekt.webserver.v1.Q.boost:type_name -> zoekt.webserver.v1.Boost 1612 + 0, // 17: zoekt.webserver.v1.RawConfig.flags:type_name -> zoekt.webserver.v1.RawConfig.Flag 1613 + 2, // 18: zoekt.webserver.v1.Symbol.expr:type_name -> zoekt.webserver.v1.Q 1614 + 10, // 19: zoekt.webserver.v1.BranchesRepos.list:type_name -> zoekt.webserver.v1.BranchRepos 1615 + 21, // 20: zoekt.webserver.v1.RepoSet.set:type_name -> zoekt.webserver.v1.RepoSet.SetEntry 1616 + 2, // 21: zoekt.webserver.v1.Type.child:type_name -> zoekt.webserver.v1.Q 1617 + 1, // 22: zoekt.webserver.v1.Type.type:type_name -> zoekt.webserver.v1.Type.Kind 1618 + 2, // 23: zoekt.webserver.v1.And.children:type_name -> zoekt.webserver.v1.Q 1619 + 2, // 24: zoekt.webserver.v1.Or.children:type_name -> zoekt.webserver.v1.Q 1620 + 2, // 25: zoekt.webserver.v1.Not.child:type_name -> zoekt.webserver.v1.Q 1621 + 2, // 26: zoekt.webserver.v1.Boost.child:type_name -> zoekt.webserver.v1.Q 1622 + 27, // [27:27] is the sub-list for method output_type 1623 + 27, // [27:27] is the sub-list for method input_type 1624 + 27, // [27:27] is the sub-list for extension type_name 1625 + 27, // [27:27] is the sub-list for extension extendee 1626 + 0, // [0:27] is the sub-list for field type_name 1546 1627 } 1547 1628 1548 1629 func init() { file_zoekt_webserver_v1_query_proto_init() } ··· 1767 1848 return nil 1768 1849 } 1769 1850 } 1851 + file_zoekt_webserver_v1_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { 1852 + switch v := v.(*Boost); i { 1853 + case 0: 1854 + return &v.state 1855 + case 1: 1856 + return &v.sizeCache 1857 + case 2: 1858 + return &v.unknownFields 1859 + default: 1860 + return nil 1861 + } 1862 + } 1770 1863 } 1771 1864 file_zoekt_webserver_v1_query_proto_msgTypes[0].OneofWrappers = []interface{}{ 1772 1865 (*Q_RawConfig)(nil), ··· 1786 1879 (*Q_Or)(nil), 1787 1880 (*Q_Not)(nil), 1788 1881 (*Q_Branch)(nil), 1882 + (*Q_Boost)(nil), 1789 1883 } 1790 1884 type x struct{} 1791 1885 out := protoimpl.TypeBuilder{ ··· 1793 1887 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 1794 1888 RawDescriptor: file_zoekt_webserver_v1_query_proto_rawDesc, 1795 1889 NumEnums: 2, 1796 - NumMessages: 19, 1890 + NumMessages: 20, 1797 1891 NumExtensions: 0, 1798 1892 NumServices: 0, 1799 1893 },
+7
grpc/protos/zoekt/webserver/v1/query.proto
··· 23 23 Or or = 15; 24 24 Not not = 16; 25 25 Branch branch = 17; 26 + Boost boost = 18; 26 27 } 27 28 } 28 29 ··· 141 142 // exact is true if we want to Pattern to equal branch. 142 143 bool exact = 2; 143 144 } 145 + 146 + // Boost multiplies the score of its child by the boost factor. 147 + message Boost { 148 + Q child = 1; 149 + double boost = 2; 150 + }
+23
query/query_proto.go
··· 6 6 7 7 "github.com/RoaringBitmap/roaring" 8 8 "github.com/grafana/regexp" 9 + 9 10 proto "github.com/sourcegraph/zoekt/grpc/protos/zoekt/webserver/v1" 10 11 ) 11 12 ··· 45 46 return &proto.Q{Query: &proto.Q_Not{Not: v.ToProto()}} 46 47 case *Branch: 47 48 return &proto.Q{Query: &proto.Q_Branch{Branch: v.ToProto()}} 49 + case *Boost: 50 + return &proto.Q{Query: &proto.Q_Boost{Boost: v.ToProto()}} 48 51 default: 49 52 // The following nodes do not have a proto representation: 50 53 // - GobCache: only needed for Gob encoding ··· 89 92 return NotFromProto(v.Not) 90 93 case *proto.Q_Branch: 91 94 return BranchFromProto(v.Branch), nil 95 + case *proto.Q_Boost: 96 + return BoostFromProto(v.Boost) 92 97 default: 93 98 panic(fmt.Sprintf("unknown query node %T", p.Query)) 94 99 } ··· 357 362 } 358 363 return &proto.Or{ 359 364 Children: children, 365 + } 366 + } 367 + 368 + func BoostFromProto(p *proto.Boost) (*Boost, error) { 369 + child, err := QFromProto(p.GetChild()) 370 + if err != nil { 371 + return nil, err 372 + } 373 + return &Boost{ 374 + Child: child, 375 + Boost: p.GetBoost(), 376 + }, nil 377 + } 378 + 379 + func (q *Boost) ToProto() *proto.Boost { 380 + return &proto.Boost{ 381 + Child: QToProto(q.Child), 382 + Boost: q.Boost, 360 383 } 361 384 } 362 385
+14
query/query_proto_test.go
··· 73 73 &Not{ 74 74 Child: &Language{Language: "go"}, 75 75 }, 76 + &Boost{ 77 + Child: &Or{ 78 + Children: []Q{ 79 + &And{ 80 + Children: []Q{ 81 + &Substring{Pattern: "foo"}, 82 + &Substring{Pattern: "bar"}, 83 + }, 84 + }, 85 + &Substring{Pattern: "foo bar"}, 86 + }, 87 + }, 88 + Boost: 20, 89 + }, 76 90 } 77 91 78 92 for _, q := range testCases {