arangodb

On multiple index usage in ArangoDB

末鹿安然 提交于 2019-12-04 04:59:24
问题 Having a document of a following structure: { path: String, enabled: Long, disabled: null || Long, // other fields... } I would like to look the documents up by a combination of path's prefix and numerical relation between some number and document's timestamps: (pseudocode) SELECT e FROM entries WHERE e.path STARTS WITH "somePrefix" AND e.enabled <= timestamp AND ( e.disabled == null OR timestamp < e.disabled ) What index structure will I benefit from the most, if any? Should I have a non

How to embed ArangoDB in a desktop application

烈酒焚心 提交于 2019-12-04 03:34:54
I would like to embed a graph database in my application (shipping for windows, linux & MAC). I narrowed the search down to ArangoDB & OrientDB. I was able to get embedded OrientDB to work but I'd still like to try ArangoDB to make an informed decision. Documentation for OrientDB embedded version is pretty clear while I can't find anything for ArangoDB. ArangoDB is written in C++ so I also have to figure out how to make it be portable across platforms and how to install it with my application. The usage of ArangoDB (or OrientDB) should be transparent to the users of our application. Thanks!

How to count and order by number of incoming edges

限于喜欢 提交于 2019-12-04 03:14:44
I am trying to get get the ten people who have starred in the most movies and get the name and the number of movies in decending order. I am using the IMDB dataset . This is what I have so far: arangosh [_system]> var Graph = require("org/arangodb/graph").Graph; arangosh [_system]> var db = require("org/arangodb").db; arangosh [_system]> statement = db._createStatement({query: 'FOR vert IN imdb_vertices FILTER vert.type == "Person" LET edge_count = (LENGTH(EDGES(imdb_edges, vert, "outbound", [{type: "ACTS_IN"}]))) RETURN {"name": vert.name, "count": edge_count}'}) [object ArangoStatement]

Connect ArangoDB remotely

空扰寡人 提交于 2019-12-03 17:47:46
问题 I try to connect to ArangoDB which located in another server from my PC but seems unsuccessful. I then tried to access it by using the Web UI provided by typing the server ip http://x.x.x.x:8529 but failed too. I tried my luck on the localhost ArangoDB and replace it with my own PC ip address and it doesn't work too. It only works when the ip name is 127.0.0.1 or the name is localhost. May I know how to access arangoDB. FYI, I have tried the approach here. Remote javascript interaction with

What is the fastest ArangoDB friends-of-friends query (with count)

痴心易碎 提交于 2019-12-03 15:20:45
问题 I'm trying to use ArangoDB to get a list of friends-of-friends. Not just a basic friends-of-friends list, I also want to know how many friends the user and the friend-of-a-friend have in common and sort the result. After several attempts at (re)writing the best performing AQL query, this is what I ended up with: LET friends = ( FOR f IN GRAPH_NEIGHBORS('graph', @user, {"direction": "any", "includeData": true, "edgeExamples": { name: "FRIENDS_WITH"}}) RETURN f._id ) LET foafs = (FOR friend IN

Sparql-interface for ArangoDB

╄→尐↘猪︶ㄣ 提交于 2019-12-03 11:04:23
问题 for arangodb, I know its own query language AQL, and as far as I can see there is also an add-on which allows to use Gremlin for graph traversals etc. In one of my projects, we strongly use SPARQL, so: Is there a way to use SPARQL as query language for arangodb? Best Regards, Stefan 回答1: How can SPARQL and RDF relate to AQL and ArangoDB? SPARLQ is a language tailored to work on top of RDF, therefore we first need to compare the datastores: RDF VS. ArangoDB Collections While both refer to

Connect ArangoDB remotely

落花浮王杯 提交于 2019-12-03 06:26:46
I try to connect to ArangoDB which located in another server from my PC but seems unsuccessful. I then tried to access it by using the Web UI provided by typing the server ip http://x.x.x.x:8529 but failed too. I tried my luck on the localhost ArangoDB and replace it with my own PC ip address and it doesn't work too. It only works when the ip name is 127.0.0.1 or the name is localhost. May I know how to access arangoDB. FYI, I have tried the approach here. Remote javascript interaction with arangodb but cannot get through. Appreciate if anyone can help. Thanks. The server by default only opens

What is the fastest ArangoDB friends-of-friends query (with count)

[亡魂溺海] 提交于 2019-12-03 05:00:39
I'm trying to use ArangoDB to get a list of friends-of-friends. Not just a basic friends-of-friends list, I also want to know how many friends the user and the friend-of-a-friend have in common and sort the result. After several attempts at (re)writing the best performing AQL query, this is what I ended up with: LET friends = ( FOR f IN GRAPH_NEIGHBORS('graph', @user, {"direction": "any", "includeData": true, "edgeExamples": { name: "FRIENDS_WITH"}}) RETURN f._id ) LET foafs = (FOR friend IN friends FOR foaf in GRAPH_NEIGHBORS('graph', friend, {"direction": "any", "includeData": true,

MongoDB + Neo4J vs OrientDB vs ArangoDB [closed]

旧街凉风 提交于 2019-12-03 01:53:39
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 3 years ago . I am currently on design phase of a MMO browser game, game will include tilemaps for some real time locations (so tile data for each cell) and a general world map. Game engine I prefer uses MongoDB for persistent data world. I will also implement a shipping simulation (which

Multiple graphs using same edge definitions in ArangoDB

十年热恋 提交于 2019-12-02 14:05:18
问题 I am evaluating ArangoDB and trying to create multiple graphs that might contain same node collections and same edge collections - even though each graph might contain different physical documents and edges. However when trying to create a graph that would use an edge collection that is already used in another graph I am getting " [1921] ... edge collection already used in edge def " error. Why can't graphs reuse existing relationships when it is possible for graphs to share same document