Skip to content

Commit

Permalink
MB-60719: Do not omit score from document hits, even when empty
Browse files Browse the repository at this point in the history
+ Omitting the score from the document hits when score:"none"
  causes an older SDK to panic that was expecting to see the
  attribute regardless.
  • Loading branch information
abhinavdangeti committed Apr 26, 2024
1 parent e687956 commit 13229b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion search/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ type DocumentMatch struct {
Index string `json:"index,omitempty"`
ID string `json:"id"`
IndexInternalID index.IndexInternalID `json:"-"`
Score float64 `json:"score,omitempty"`
Score float64 `json:"score"`
Expl *Explanation `json:"explanation,omitempty"`
Locations FieldTermLocationMap `json:"locations,omitempty"`
Fragments FieldFragmentMap `json:"fragments,omitempty"`
Expand Down

0 comments on commit 13229b6

Please sign in to comment.