bitshares / bitshares-core

BitShares Blockchain node and command-line wallet
https://bitshares.github.io/
Other
1.17k stars 643 forks source link

Fix ES plugin by inserting maps as strings #2553

Closed abitmore closed 2 years ago

abitmore commented 2 years ago

PR for #2549.

Note this is an ugly fix.

The final fix should be something like the one mentioned in https://github.com/bitshares/bitshares-core/pull/1396#issuecomment-432725835 :

https://www.elastic.co/guide/en/elasticsearch/reference/current/array.html :

...however, all values in the array must be of the same datatype...

That sucks. I'm surprised this doesn't bite us more often, since all static_variants serialize like this IIRC. Then again, static variant serialization sucks even more. :-/

Ok for now, but we should change this in the next release IMO. E. g.

[ tag_no, { object:data }] -> { _type: type_name, object:data }
sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication