From 6eab8ecfb07088b1fe76b6acef8b1dfa15524fe7 Mon Sep 17 00:00:00 2001 From: Keegan Carruthers-Smith Date: Sun, 25 Feb 2024 22:17:31 +0200 Subject: [PATCH] remove deprecated ShardMaxImportantMatch TotalMaxImportantMatch Both of these fields have been unread and mark deprecated for a while. Test Plan: go test --- api.go | 8 -------- api_proto_test.go | 3 --- 2 files changed, 11 deletions(-) diff --git a/api.go b/api.go index 02153a8d0..1641fed1a 100644 --- a/api.go +++ b/api.go @@ -892,12 +892,6 @@ type SearchOptions struct { // be set to 1 to find all repositories containing a result. ShardRepoMaxMatchCount int - // Deprecated: this field is not read anymore. - ShardMaxImportantMatch int - - // Deprecated: this field is not read anymore. - TotalMaxImportantMatch int - // Abort the search after this much time has passed. MaxWallTime time.Duration @@ -986,8 +980,6 @@ func (s *SearchOptions) String() string { addInt("ShardMaxMatchCount", s.ShardMaxMatchCount) addInt("TotalMaxMatchCount", s.TotalMaxMatchCount) addInt("ShardRepoMaxMatchCount", s.ShardRepoMaxMatchCount) - addInt("ShardMaxImportantMatch", s.ShardMaxImportantMatch) - addInt("TotalMaxImportantMatch", s.TotalMaxImportantMatch) addInt("MaxDocDisplayCount", s.MaxDocDisplayCount) addInt("MaxMatchDisplayCount", s.MaxMatchDisplayCount) addInt("NumContextLines", s.NumContextLines) diff --git a/api_proto_test.go b/api_proto_test.go index 75f37f0b4..79d939571 100644 --- a/api_proto_test.go +++ b/api_proto_test.go @@ -335,9 +335,6 @@ func TestProtoRoundtrip(t *testing.T) { t.Run("SearchOptions", func(t *testing.T) { f := func(f1 *SearchOptions) bool { if f1 != nil { - // Ignore deprecated and unimplemented fields - f1.ShardMaxImportantMatch = 0 - f1.TotalMaxImportantMatch = 0 f1.SpanContext = nil } p1 := f1.ToProto()