(cherry picked from commit efca93a3f3)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
co-authored by
Ryan McKinley
parent
afec2786fc
commit
d8eb9fcb9c
@@ -186,12 +186,13 @@ func getDashboardPanelDocs(dash dashboard, location string) []*bluge.Document {
|
||||
var docs []*bluge.Document
|
||||
url := fmt.Sprintf("/d/%s/%s", dash.uid, dash.slug)
|
||||
for _, panel := range dash.info.Panels {
|
||||
uid := dash.uid + "#" + strconv.FormatInt(panel.ID, 10)
|
||||
purl := url
|
||||
if panel.Type != "row" {
|
||||
purl = fmt.Sprintf("%s?viewPanel=%d", url, panel.ID)
|
||||
if panel.Type == "row" {
|
||||
continue // for now, we are excluding rows from the search index
|
||||
}
|
||||
|
||||
uid := dash.uid + "#" + strconv.FormatInt(panel.ID, 10)
|
||||
purl := fmt.Sprintf("%s?viewPanel=%d", url, panel.ID)
|
||||
|
||||
doc := newSearchDocument(uid, panel.Title, panel.Description, purl).
|
||||
AddField(bluge.NewKeywordField(documentFieldDSUID, dash.uid).StoreValue()).
|
||||
AddField(bluge.NewKeywordField(documentFieldPanelType, panel.Type).Aggregatable().StoreValue()).
|
||||
|
||||
Reference in New Issue
Block a user