0
0
Fork 0

initialize only with an imminent merge

This commit is contained in:
Sreekanth Sivasankaran 2018-01-11 15:09:27 +05:30
parent 3afc5458e0
commit 039a4df33b
1 changed files with 1 additions and 1 deletions

View File

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