Storage: Dashboard summary builder cleanup (#56665)

This commit is contained in:
Ryan McKinley
2022-10-13 09:29:19 -04:00
committed by GitHub
parent b8b25f7e31
commit 3b4b528993
14 changed files with 571 additions and 294 deletions

View File

@@ -213,13 +213,13 @@ func getDashboardPanelDocs(dash dashboard, location string) []*bluge.Document {
Aggregatable().
SearchTermPositions())
}
case models.StandardKindPanel:
if ref.Type != "" {
doc.AddField(bluge.NewKeywordField(documentFieldPanelType, ref.Type).Aggregatable().StoreValue())
case models.ExternalEntityReferencePlugin:
if ref.Type == models.StandardKindPanel && ref.UID != "" {
doc.AddField(bluge.NewKeywordField(documentFieldPanelType, ref.UID).Aggregatable().StoreValue())
}
case models.StandardKindTransform:
if ref.Type != "" {
doc.AddField(bluge.NewKeywordField(documentFieldTransformer, ref.Type).Aggregatable())
case models.ExternalEntityReferenceRuntime:
if ref.Type == models.ExternalEntityReferenceRuntime_Transformer && ref.UID != "" {
doc.AddField(bluge.NewKeywordField(documentFieldTransformer, ref.UID).Aggregatable())
}
}
}