arangojs

How to store documents in an ArangoDb graph using ArangoJs?

半城伤御伤魂 提交于 2020-01-02 07:14:14
问题 I am using latest version of ArangoDb and ArangoJs from a nodejs application. I have got following two vertexes users tokens tokens vertex contain the security tokens issues to one of the user in the users vertex. I have got an edge definition named token_belongs_to connecting tokens to users How do I store a newly generated token belonging to an existing user using ArangoJs? 回答1: I am going to assume you are using ArangoDB 2.7 with the latest version of arangojs (4.1 at the time of this

Determining which unique constraint caused INSERT failure in ArangoDB

三世轮回 提交于 2019-12-25 08:33:35
问题 I have a document collection in ArangoDB that has multiple unique indexes. When inserting a new document, the insert could fail because of any of the unique indexes. Is there a way to easily figure out which field(s) in the document caused the insert to fail? For example, take a collection that stores user data. Unique indexes on both the "username" and "email" fields mean that an insert could fail if either of those fields are duplicated. Error messages are non-specific: { error: true,

How to use full text search with arango REST API as I'm always getting empty result?

风流意气都作罢 提交于 2019-12-23 22:01:21
问题 Data in Arango: { "employees": [ { "lastName": "Ansari", "firstName": "Haseb" }, { "lastName": "Ansari", "firstName": "Affan" }, { "lastName": "Keshav", "firstName": "Anil" } ], "_id": "test/124518952473", "_rev": "124518952473", "_key": "124518952473" } Indexing: POST http://localhost:8529/_db/db_test/_api/index?collection=test Body: { "type" : "fulltext", "fields" : [ "lastName" ] } Searching: PUT http://localhost:8529/_db/db_test/_api/simple/fulltext Body: { "collection" : "test",

How to store images in ArangoDB?

本小妞迷上赌 提交于 2019-12-07 08:12:29
问题 I want to store images in ArangoDb as image file. I want to know if there is any API or Java API for the same. Thanking You in advance. 回答1: Storing binary data inside ArangoDB has been a long standing feature request. Currently its not possible out of the box. One can however do this by creating a foxx service that handles the data. The recommended way is to create a file and reference that file name inside the database. A detailed description and an example foxx app can be found in the

How to store images in ArangoDB?

≡放荡痞女 提交于 2019-12-05 12:46:36
I want to store images in ArangoDb as image file. I want to know if there is any API or Java API for the same. Thanking You in advance. Storing binary data inside ArangoDB has been a long standing feature request . Currently its not possible out of the box. One can however do this by creating a foxx service that handles the data. The recommended way is to create a file and reference that file name inside the database. A detailed description and an example foxx app can be found in the cookbook 来源: https://stackoverflow.com/questions/35038637/how-to-store-images-in-arangodb