ArangoDB Query Language (or AQL) is a declarative querying language used inside the multi-model database ArangoDB.
Questions tagged [aql]
448 questions
2
votes
1 answer
How to query attributes with spaces in their names
Probably a silly question, but if in a collection I have documents which include attributes defined with spaces, example:
{
"attribute with spaces" : "blabla",
...
}
How can I query for finding it? I tried
for document in documents
filter…

Vincenzo Lavorini
- 1,884
- 2
- 15
- 26
2
votes
1 answer
Calculating the levenshtein distance between multiple strings
I am trying to calculate the levenshtein distance between multiple strings (with about million strings) at once using AQL. However, the query just freezes for hours without any progress. Is there a way to do the same in Java? I am looking for an…

Vishnukk
- 524
- 2
- 11
- 27
2
votes
1 answer
Strange performance problem with UPDATE in ArangoDB
I am creating a Node.js application that works with ArangoDB as data store. Basically, what I have as data structure is two tables, one for managing so-called instances, another one for entities. What I do is the following:
There is a document in…

Golo Roden
- 140,679
- 96
- 298
- 425
2
votes
2 answers
How to specify the database in an ArangoDb AQL query?
If have multiple databases defined on a particular ArangoDB server, how do I specify the database I'd like an AQL query to run against?
Running the query through the REST endpoint that includes the db name (substituted into [DBNAME] below)…

Dave
- 2,653
- 4
- 20
- 22
2
votes
1 answer
Disjoint subgraphs in ArangoDB AQL
Given a graph database I have an actors vetices collection that has edges connecting it to a scenes vertices collection.
I'm having trouble creating a query where I can select all the disjoint subgraphs, that is: given subgraphs A and B in the…

Rogério Peixoto
- 2,176
- 2
- 23
- 31
2
votes
1 answer
How to add/remove attributes in a document before returning it in ArangoDB?
I am trying to query a document. Before I return the document, I need to delete some attributes like _id, _rev and add a few other calculated attributes. How can I achieve this?

IMForce
- 37
- 6
2
votes
1 answer
how to get total number of ArangoDB AQL for paging
AQL support basic AQL for paging by LIMIT offset, count. But I need to get the total number of the query in order to know the total pages. How to get the total count of the query?
I know the LENGTH function to get the count of some collection, but…

NingLee
- 1,477
- 2
- 17
- 26
2
votes
2 answers
question about data model design in arangodb
Update 2:
The original question is too long, a simple way:
In The City Graph, how to query the city that can be reached directly from Berlin by germanHighway. I don't want the internationalHighway.
Original Question:
I now use ArangoDB to store a…

NingLee
- 1,477
- 2
- 17
- 26
2
votes
1 answer
ArangoDB AQL - Can I traverse multiple graphs in one query?
I would like to store data that is not directly related into seperate named graphs in ArangoDB. However, there might be cases where I would want to query data from more than one of these graphs at a time.
I know that you can perform a graph…

Ponsietta
- 315
- 6
- 17
2
votes
1 answer
Query multiple collections Arangodb
FOR col_name IN ['col_1', 'col_2']
FOR d IN FULLTEXT(col_name, 'label', @value)
RETURN d
does not works
but
FOR d IN FULLTEXT('col_1', 'label', @value)
RETURN d
works fine
I am using arango 3.4.2-1

Nico Grossman
- 21
- 3
2
votes
1 answer
ArangoDB: order in graph traversal
I have a pretty standard graphql which represent a tree structure:
I would like to make a graph traversal and force the order according to the order I set on each edge:
A -> C
A -> B -> E
A -> B -> D
I tried to add a SORT on my query, but it sorts…

Tdy
- 863
- 12
- 28
2
votes
2 answers
Getting index of the resultset
Is there a way to get the index of the results within an aql query?
Something like
FOR user IN Users sort user.age DESC RETURN {id:user._id, order:{index?}}

Sanka Darshana
- 1,391
- 1
- 23
- 41
2
votes
1 answer
Run arangodb text file from command line
Description
In MySQL world, one can create an SQL file and execute it from the command line.
mysql -h hostname -u user database < path/to/sqlfile.sql
This is especially useful for test data.
I've checked the Arangodb documentation and the best I can…

MRainzo
- 3,800
- 2
- 16
- 25
2
votes
1 answer
AQL cutting off data when querying through console
Trying to query some bin for some record through AQL, however, the data is cut off.
Any ideas how to make AQL print full data?
aql> select tokens from user.users where…

JACK ZHANG
- 600
- 1
- 7
- 16
2
votes
1 answer
Optimize Query in arangodb
I am running the following query in arangodb:
LET catalogDatasets = []
LET openDatasets = ( FOR d IN datasets FILTER d.visibility == "open" RETURN d._id )
LET myDatasets = []
LET myPurchasedDatasets = []
LET searchTarget = UNIQUE( UNION(…

Israel Zinc
- 2,713
- 2
- 18
- 30