Search: Explain scores (#98316)
This commit is contained in:
@@ -64,10 +64,10 @@ type DashboardHit struct {
|
||||
Folder string `json:"folder,omitempty"`
|
||||
// Stick untyped extra fields in this object (including the sort value)
|
||||
Field *common.Unstructured `json:"field,omitempty"`
|
||||
// Explain the score (if possible)
|
||||
Explain *common.Unstructured `json:"explain,omitempty"`
|
||||
// When using "real" search, this is the score
|
||||
Score float64 `json:"score,omitempty"`
|
||||
// Explain the score (if possible)
|
||||
Explain *common.Unstructured `json:"explain,omitempty"`
|
||||
}
|
||||
|
||||
type FacetResult struct {
|
||||
|
||||
@@ -268,12 +268,6 @@ func schema_pkg_apis_dashboard_v0alpha1_DashboardHit(ref common.ReferenceCallbac
|
||||
Ref: ref("github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1.Unstructured"),
|
||||
},
|
||||
},
|
||||
"explain": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Explain the score (if possible)",
|
||||
Ref: ref("github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1.Unstructured"),
|
||||
},
|
||||
},
|
||||
"score": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "When using \"real\" search, this is the score",
|
||||
@@ -281,6 +275,12 @@ func schema_pkg_apis_dashboard_v0alpha1_DashboardHit(ref common.ReferenceCallbac
|
||||
Format: "double",
|
||||
},
|
||||
},
|
||||
"explain": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Explain the score (if possible)",
|
||||
Ref: ref("github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1.Unstructured"),
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"resource", "name", "title"},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user