我刚刚从版本 3.10 迁移到 3.11.6。 通过网络界面,我尝试运行基本查询进行测试,但 1000 万年后该查询仍然没有得到解决。
我加载了安道尔的路线图(https://michaelmathieu.net/resources/andorra_data.zip)。
当我运行以下查询时,一切都很好(在不到 1 毫秒的时间内解决): FOR 路径 IN OUTBOUND K_SHORTEST_PATHS 'points/1' TO 'points/20' 方式限制 1 个返回路径
但是当我添加选项来指定weightAttribute时,它没有响应: FOR 路径 IN OUTBOUND K_SHORTEST_PATHS 'points/1' TO 'points/20' 方式 OPTIONS { WeightAttribute: 'cost', defaultWeight: 1000 } LIMIT 1 RETURN path
以前的版本从未出现过此问题。
这是执行计划:
{
"plan": {
"nodes": [
{
"type": "SingletonNode",
"dependencies": [],
"id": 1,
"estimatedCost": 1,
"estimatedNrItems": 1
},
{
"type": "EnumeratePathsNode",
"dependencies": [
1
],
"id": 2,
"estimatedCost": 74.91332290800307,
"estimatedNrItems": 1,
"database": "andorra",
"graph": [
"ways"
],
"isLocalGraphNode": false,
"isUsedAsSatellite": false,
"defaultDirection": 2,
"directions": [
2
],
"edgeCollections": [
"ways"
],
"vertexCollections": [
"ways"
],
"collectionToShard": {},
"optimizedOutVariables": [],
"isSmart": false,
"isDisjoint": false,
"forceOneShardAttributeValue": false,
"tmpObjVariable": {
"id": 2,
"name": "1",
"isFullDocumentFromCollection": false
},
"tmpObjVarNode": {
"type": "reference",
"typeID": 45,
"name": "1",
"id": 2
},
"tmpIdNode": {
"type": "value",
"typeID": 40,
"value": "",
"vTypeID": 4
},
"options": {
"parallelism": 1,
"produceVertices": true,
"maxProjections": 5,
"minDepth": 1,
"maxDepth": 1,
"weightAttribute": "cost",
"defaultWeight": 1000,
"type": "shortestPath"
},
"indexes": {
"base": [
{
"id": "1",
"type": "edge",
"name": "edge",
"fields": [
"_from"
],
"selectivityEstimate": 0.5408036454018227,
"unique": false,
"sparse": false
}
]
},
"shortestPathType": "K_SHORTEST_PATHS",
"pathOutVariable": {
"id": 0,
"name": "path",
"isFullDocumentFromCollection": false
},
"startVertexId": "points/1",
"targetVertexId": "points/20",
"fromCondition": {
"type": "n-ary and",
"typeID": 62,
"subNodes": [
{
"type": "compare ==",
"typeID": 25,
"excludesNull": false,
"subNodes": [
{
"type": "attribute access",
"typeID": 35,
"name": "_from",
"subNodes": [
{
"type": "reference",
"typeID": 45,
"name": "1",
"id": 2
}
]
},
{
"type": "value",
"typeID": 40,
"value": "",
"vTypeID": 4
}
]
}
]
},
"toCondition": {
"type": "n-ary and",
"typeID": 62,
"subNodes": [
{
"type": "compare ==",
"typeID": 25,
"excludesNull": false,
"subNodes": [
{
"type": "attribute access",
"typeID": 35,
"name": "_to",
"subNodes": [
{
"type": "reference",
"typeID": 45,
"name": "1",
"id": 2
}
]
},
{
"type": "value",
"typeID": 40,
"value": "",
"vTypeID": 4
}
]
}
]
}
},
{
"type": "LimitNode",
"dependencies": [
2
],
"id": 3,
"estimatedCost": 75.91332290800307,
"estimatedNrItems": 1,
"offset": 0,
"limit": 1,
"fullCount": false
},
{
"type": "ReturnNode",
"dependencies": [
3
],
"id": 4,
"estimatedCost": 76.91332290800307,
"estimatedNrItems": 1,
"inVariable": {
"id": 0,
"name": "path",
"isFullDocumentFromCollection": false
},
"count": true
}
],
"rules": [],
"collections": [
{
"name": "ways",
"type": "read"
}
],
"variables": [
{
"id": 0,
"name": "path",
"isFullDocumentFromCollection": false
},
{
"id": 2,
"name": "1",
"isFullDocumentFromCollection": false
}
],
"estimatedCost": 76.91332290800307,
"estimatedNrItems": 1,
"isModificationQuery": false
},
"cacheable": true,
"warnings": [],
"stats": {
"rulesExecuted": 43,
"rulesSkipped": 0,
"plansCreated": 1,
"peakMemoryUsage": 0,
"executionTime": 0.0002441999999973632
},
"error": false,
"code": 200
}