You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is support for nested edges and nested vertices. But it requires some field to explicitly be id. Document's _id field is not accessible from nested context and anyway does not work. Specifying non-unique ids lead to weird behavior (seems, that documents having same id collide and only one survive).
How can we solve that?
I'd expect ids of nested relations to be generated from document _id plus some suffix, which can include either nested document index or some of nested document fields. So, if my document has _id = 'asdf', then subdoc may have something like 'asdf-relations[0]' or 'asdf-relations[myRelationType-myOtherNode]'
There is support for nested edges and nested vertices. But it requires some field to explicitly be id. Document's _id field is not accessible from nested context and anyway does not work. Specifying non-unique ids lead to weird behavior (seems, that documents having same id collide and only one survive).
How can we solve that?
I'd expect ids of nested relations to be generated from document _id plus some suffix, which can include either nested document index or some of nested document fields. So, if my document has _id = 'asdf', then subdoc may have something like 'asdf-relations[0]' or 'asdf-relations[myRelationType-myOtherNode]'
Examples:
Unipop Elastic mapping:
{
"class": "org.unipop.elastic.ElasticSourceProvider",
"addresses": "http://localhost:9200",
"vertices": [
{
"index": "nodes",
"id": "@_id",
"label": "node",
"properties": {
},
"edges": [
{
"index": "nodes",
"path": "relations",
"id": "@relatedNodeId", // this is not unique
"label": "relation",
"direction": "OUT",
"properties": {
},
"vertex":{
"ref": true,
"id": "@relatedNodeId",
"label": "node"
}
}
]
}
]
}
Document:
"_source": {
"relations": [
{
"relationType": "myRelationType",
"relatedNodeId": "myOtherNode"
}
]
}
Thank you.
The text was updated successfully, but these errors were encountered: