[search] title phrase (#99753)

[search] rename title_sort to title_phrase
This commit is contained in:
Scott Lepper
2025-01-29 17:31:59 -05:00
committed by GitHub
parent cf177776bf
commit 8e9e3b8362
14 changed files with 62 additions and 51 deletions
@@ -240,9 +240,9 @@ func (s *Service) getFolderByTitleFromApiServer(ctx context.Context, orgID int64
Key: folderkey,
Fields: []*resource.Requirement{
{
Key: resource.SEARCH_FIELD_TITLE_SORT,
Key: resource.SEARCH_FIELD_TITLE_PHRASE,
Operator: string(selection.In),
Values: []string{strings.ToLower(title)},
Values: []string{title},
},
},
Labels: []*resource.Requirement{},
@@ -567,7 +567,7 @@ func (r resourceClientMock) Search(ctx context.Context, in *resource.ResourceSea
}
if len(in.Options.Fields) > 0 &&
in.Options.Fields[0].Key == resource.SEARCH_FIELD_TITLE_SORT &&
in.Options.Fields[0].Key == resource.SEARCH_FIELD_TITLE_PHRASE &&
in.Options.Fields[0].Operator == "in" &&
len(in.Options.Fields[0].Values) > 0 &&
in.Options.Fields[0].Values[0] == "foo" {