#18662·arangodb

Use an attribute inside a vector as WeightAttribute for graph traversal

Author: simalessandriCreated Apr 12, 2023Updated Jul 24, 2026
Labels1 Feature3 AQL1 Question3 Graph2 Solved

My Environment

  • ArangoDB Version: 3.10.2
  • Deployment Mode: Single Server
  • Deployment Strategy: Manual Start in Docker
  • Infrastructure: own
  • Operating System: MacOs Ventura 13.1
  • Total RAM in your machine: 8gb

Component, Query & Data

Affected feature:

AQL query using web interface

AQL explain and/or profile (if applicable):

I need to perform an ordered graph traversal, based on weight parameter.

The edges in my graph are similar to the following:

{ "_key": "2a3MVlllIs9lQCksMZWf66", "_id": "Relations/2a3MVlllIs9lQCksMZWf66", "_from": "Elements/51ZDzfDgJeIwMOm1oz4CfB", "_to": "Elements/1sKy8S9cvZHBXu3fV_pr5j", "_rev": "_fsUByc----", "Data": { "Weight": "32", "Deleted": false }, "_type": "1000000000000000000004" }

Problem:

I know that I have to add the following option to graph traversal:

OPTIONS { order: 'weighted', weightAttribute: 'AttributeName'}

but I have no idea how to specify a weight parameter contained in Data vector...

I tried the following with no success:

OPTIONS { order: 'weighted', weightAttribute: 'Data.Weight'} OPTIONS { order: 'weighted', weightAttribute: 'Data[*].Weight'}