arangodb

Remote access to ArangoDB through Java Interface

寵の児 提交于 2019-12-11 05:49:09
问题 I have developed a Java application that uses ArangoDB as backend database (Used ArangoDB Java-Driver/Interface to access ArangoDB). Everything is good until my ArangoDB and Application resides on same machine. Once i moved ArangoDB to remote machine(Dedicated Server), my application is unable to access it :( I have given my remote machine details(ArangoDB Server) in some properties file and feeding that file location to ArangoConfigure Constructor while creating ArangoDriver Object. But

How to use WITHIN with 2 geo indexes in one collection?

烂漫一生 提交于 2019-12-11 05:19:21
问题 I have 2 geo indexes in the collection. I need to find all the documents on the first geo-index and another time on another geo-index. LET cFrom = ( FOR c IN WITHIN("city", 22.5455400, 114.0683000, 3000, "geofrom") FOR r IN rcity FILTER r._from == c._id && r.user == "5010403" && r.type == "freight-m" LIMIT 1 RETURN r) LET cTo = ( FOR c IN WITHIN("city", 55.7522200, 37.6155600, 3000, "geoTo") FOR r IN rcity FILTER r._to == c._id && r.user == "5010403" && r.type == "freight-r" LIMIT 100 RETURN

Manage multi-tenancy ArangoDB connection

假装没事ソ 提交于 2019-12-11 04:06:22
问题 I use ArangoDB/Go (using go-driver) and need to implement multi-tenancy, means every customer is going to have his data in a separate DB. What I'm trying to figure out is how to make this multi-tenancy work. I understand that it's not sustainable to create a new DB connection for each request, means I have to maintain a pool of connections (not a typical connection pool tho). Of course, I can't just assume that I can make limitless, there has to be a limit. However, the more I think about

How to merge all results of AQL into single document with custom properties

爱⌒轻易说出口 提交于 2019-12-11 03:37:46
问题 I have an AQL query traversing graph that always should return a fixed amount of documents from a unique set of collections. So each collection will occur only once and with one document only. I wish to merge them all into a single document under properties that reflects document’s collection name. Query as simple as: FOR v IN ANY "vertex/key" edge_collection RETURN v Returns a sample result as: [ { "_key": "123", "_id": "foo/123", "_rev": "_WYhh0ji---", "foo_attribute": "lorem impsum" }, { "

Model Schema for vertices and edges

纵饮孤独 提交于 2019-12-11 01:07:17
问题 How to validate graph (vertices and edges) data like what happens in OrientDB? For example, If my graph has vertices/edges of format { "name": :any_name, "age" : 13 } How can I associate it with a well defined schema (with validations)? In OrientDB, there is feature of storing data in vertices and edges also and each of the schemas are well defined. How can I do this in arangoDB? 回答1: "Out-of-the-box" ArangoDB does not support schema enforcement. Clearly that is potentially a signficant

How to solve Arango query promise error? [duplicate]

偶尔善良 提交于 2019-12-10 23:04:55
问题 This question already exists : AQL Query returns a Promise Closed last year . I have been trying to get a query result from Arangodb in to my front end service (Angular 4) using soap message. I am able to get a result of the query but printed out in console.log. But how can I get it under this function (Service). So that I can feed into the soap message: var soap_msg = '<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns

Does Sails.js or Meteor.js work with ArangoDB or OrientDB?

拥有回忆 提交于 2019-12-10 13:18:20
问题 I'm planning to work on a social site and I would like to leverage both a document and graph database for all of the desired features. Is there a way to get Meteor.js or Sail.js (or any better) to work with ArangoDB or OrientDB? Or should I just stick with the bundled MongoDB and integrate something like allegrograph DB? 回答1: Sails.js has support for both of the databases you mention: https://www.npmjs.com/package/sails-orientdb https://github.com/rosmo/sails-arangodb In addition to MongoDB,

Programmatically creating edges in ArangoDB

痞子三分冷 提交于 2019-12-10 11:21:43
问题 What is the simplest way to quickly create edges in ArangoDB programmatically? I would like to create relationships between documents based on a common attribute. I'd like to be able to select an attribute, and for every document in collection A, create an edge to every document in collection B that has the same value in an equivalent attribute. For example, if I've imported email messages into a collection and people into another collection, I would like to generate edges between the emails

How to count and order by number of incoming edges

痴心易碎 提交于 2019-12-09 16:19:48
问题 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", [

Getting data for d3 from ArangoDB using AQL (or arangojs)

纵然是瞬间 提交于 2019-12-08 23:15:07
问题 I'm building an app based around a d3 force-directed graph with ArangoDB on the backend, and I want to be able to load node and link data dynamically from Arango as efficiently as possible. I'm not an expert in d3, but in general the force layout seems to want the its data as an array of nodes and an array of links that have the actual node objects as their sources and targets, like so: var nodes = [ {id: 0, reflexive: false}, {id: 1, reflexive: true }, {id: 2, reflexive: false} ], links = [