Unified Storage: Make all dashboard fields searchable (#98899)
* wip. adding sprinkles fields. * some refactoring. Works with sprinkles now. * exclude top level dashboard hit fields from hit "fields" * adds unit test for DecodeCell helper * test can search for specific dashboard fields on bleve index * adds search handler tests for the fields and tests for fields when transforming the search req to a bleve search req * fix panic when calling fields.Set() with int32 * adds regression test * remove unneeded method on test mock client * fix linter issues * updates dashboard test data for bleve tests * remove DASHBOARD_LEGACY_ID from bleve_tests * dont cast twice * updates test to sort by dashboard_views_last_1_days * declare excludedFields outside of function * fixes sorting by dashboard fields - prepends "fields." to any dashboard fields we try to sort by * uses map for excludedFields * expects fields to be array-style url param * change method name * fixes failing tests - needed to add column type to mocks
This commit is contained in:
@@ -237,6 +237,8 @@ func (x *searchableDocumentFields) Fields() []string {
|
||||
}
|
||||
|
||||
func (x *searchableDocumentFields) Field(name string) *ResourceTableColumnDefinition {
|
||||
name = strings.TrimPrefix(name, "fields.")
|
||||
|
||||
f, ok := x.fields[name]
|
||||
if ok {
|
||||
return f.def
|
||||
|
||||
Reference in New Issue
Block a user