Open abitmore opened 2 years ago
There was a template mentioned in another issue: https://github.com/bitshares/bitshares-core/issues/681#issuecomment-367224169
I'm using template to pre-define the settings:
$ curl -XPUT 'http://localhost:9200/_template/graphene' -d '{
"index_patterns" : ["graphene-*"],
"settings": { "number_of_shards": 2,
"index": {
"translog": {
"retention": {
"size": "512mb", "age": "300s"
}
}
}
}
}' -H 'Content-Type: application/json
User Story
Object arrays stored in ES are flattened by default (see https://www.elastic.co/guide/en/elasticsearch/reference/current/nested.html).
For example, for
account_auths
in account history object with ID2.9.671969
, the original input wasAfter processed by our code in ES plugin (#2565), it becomes
But in ES it got flattened as
Screenshot:![image](https://user-images.githubusercontent.com/9946777/147389683-d7dd1c2d-1b9f-4e53-acd3-765c26f337b8.png)
If we query with
"key_string" : "1.2.121" and "data_int" : 15
, this record will be returned. This behavior is not desired.To fix this, we need to store
account_auths_object
asnested
type but not automatically (by the default dynamic mapping rules) asobject
. It means we need to specify our own explicit mappings.And there are more fields. The most complex case is multi-level nested proposals, although most of them were malformed unexpectedly.
The challenges are
Impacts Describe which portion(s) of BitShares Core may be impacted by your request. Please tick at least one box.
CORE TEAM TASK LIST