Hi, I can use shortest query normally without specify depth
param. For example:
{
path as shortest(from: 0x24a, to: 0x4,numpaths: 2) {
~purchase
purchase
}
path(func: uid(path)) {
uid
}
}
The result is:
{
"data": {
"path": [
{
"uid": "0x24a"
},
{
"uid": "0x41"
},
{
"uid": "0x5a12"
},
{
"uid": "0x4"
}
],
"_path_": [
{
"purchase": [
{
"~purchase": [
{
"purchase": [
{
"uid": "0x4"
}
],
"uid": "0x5a12"
}
],
"uid": "0x41"
}
],
"uid": "0x24a"
},
{
"purchase": [
{
"~purchase": [
{
"purchase": [
{
"uid": "0x4"
}
],
"uid": "0xbc2"
}
],
"uid": "0x4e"
}
],
"uid": "0x24a"
}
]
}
}
The depth of the shortest path is 2. But when I add the param depth: 1
in query, the alpha server doesn’t return result , and the server consumes memory until it runs out in the background. Here is the query block:
{
path as shortest(from: 0x24a, to: 0x4, numpaths: 2, detph:1) {
~purchase
purchase
}
path(func: uid(path)) {
uid
}
}
memory usage(total memory: 64g ):
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
9357 root 20 0 57.990g 0.045t 355068 S 87.6 73.8 5:48.28 dgraph
I don’t know if this is because the depth parameter I specified is less than the true depth of the shortest path. The former is 1, and the latter is 2?