0
0
Fork 0

MB-27498 - date range facet query panics

Initialise the facet results map in case of an
 empty partial hits with a multi node cluster
This commit is contained in:
Sreekanth Sivasankaran 2018-01-11 14:44:05 +05:30
parent 1788a03803
commit 3afc5458e0
1 changed files with 3 additions and 0 deletions

View File

@ -481,5 +481,8 @@ func (sr *SearchResult) Merge(other *SearchResult) {
if other.MaxScore > sr.MaxScore {
sr.MaxScore = other.MaxScore
}
if len(sr.Facets) == 0 {
sr.Facets = make(search.FacetResults)
}
sr.Facets.Merge(other.Facets)
}