Details
-
Bug
-
Resolution: Fixed
-
Critical
-
7.1.0
-
Untriaged
-
0
-
Unknown
Description
Criminal: func (fr *FacetResult) Merge(other *FacetResult){}
Merge method isn't handling the case when fr.Terms == nil.
----------------------------------------------------
Q) But how did fr.Terms became nil ?? ( It is a struct and as per the usual code flow it is unlikely to have nil value )
Ans)
FacetResult construct implements custom json marshal and unmarshal logic
( This was introduced in https://github.com/blevesearch/bleve/pull/1404 )
func (tf *TermFacets) MarshalJSON() ([]byte, error) {
|
return util.MarshalJSON(tf.termFacets)
|
}
|
In case when tf.termFacets is nil, tf will be marshalled as "null" in json object, Thus making fr.Terms nil.
Attachments
For Gerrit Dashboard: MB-60207 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
202985,2 | MB-60207: upgrade bleve version | neo | cbftx | Status: MERGED | +2 | +1 |
202986,2 | MB-60207: upgrade bleve version | neo | cbft | Status: MERGED | +2 | +1 |
202987,2 | MB-60207: upgrade bleve version | neo | n1fty | Status: MERGED | +2 | +1 |
202988,2 | MB-60207: upgrade bleve version | neo | query | Status: MERGED | +2 | +1 |
203003,2 | MB-60207: bump SHA to pick up 7.2.4 fts fix | master | manifest | Status: MERGED | +2 | +1 |
203140,2 | Upgrade bleve@unstable | trinity | cbft | Status: MERGED | +2 | +1 |