问题标签 [bulbs]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
223 浏览

python - UnicodeEncodeError:灯泡和 neo4j 创建模型

当数据包含非 ascii 数据时,我在尝试通过 Bulbs 向 Neo4J 添加数据时遇到 Unicode 错误。

以下代码失败:

UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 7: ordinal not in range(128)

错误发生在bulbs.utils.u函数中,通过codecs.unicode_escape_decode()

一些希望相关的信息:

Neo4J 文档声明所有 String 对象都保存为 unicode,那么为什么我的 unicode 数据不被接受?我希望我只是错过了一些愚蠢的事情。

0 投票
1 回答
242 浏览

python - 不使用模型的球流中的选择性索引

我正在使用带有 Neo4j 的bulbflow(python),并且我正在尝试在我的键的子集上添加索引(现在,只是名为“name”的键用于可选的基于索引的查找)。

我不喜欢灯泡流模型(限制性太强),而且我不知道如何在不更改代码的情况下进行选择性索引,因为“自动索引”是一个全局设置——我不知道如何根据钥匙。

有没有人做过这样的事情?

-安德鲁

0 投票
2 回答
123 浏览

neo4j - Blulbflow Neo4j 图形数据库慢

我正在尝试在图形数据库中创建 500,000 个节点。我计划稍后根据我的要求添加边缘。我有一个包含 500,000 行的文本文件,代表要存储在每个节点中的数据。

然后我循环遍历文本文件中的每一行,

这非常慢。这在 10 分钟内给了我 5000 个节点。这可以改进吗?谢谢

0 投票
1 回答
678 浏览

groovy - How to define function in gremlin that returns the same result as in gremlin shell?

I'm currently using TinkerPop Gremlin (with a Titan backend) to implement a "similar document" algorithm.

The next lines are working perfectly well in gremlin shell :

following results are visible :

But when I try to "wrap" the same code in a function, it doesn't work anymore :

...nothing is returned

Coming from a Python backend, I assume this is related to variable scope but so far I don't understand how to fix it.

Thanks in advance for any help

Edit : I'm using Bulbs, that's why I'd like to wrap my code in a function (That I could later call from Python)

0 投票
5 回答
661 浏览

python - 如何将 ArangoDB 与灯泡和 rexster 一起使用?

我目前正在尝试使用 Bulbs 和 Rexster 访问 ArangoDB 数据库。我需要这样做,因为我想使用 Bulbs ( http://bulbflow.com ) 从 Python 启动一些 gremlin 查询。(我真的很喜欢 AQL 和 arangosh,但我已经有很多可用的 gremlin 脚本)

这是我在尝试使用 Bulbs 的 Rexster 之前所做的:

  • 我成功编译了 ArangoDB BluePrint 驱动程序并得到:blueprints-arangodb-graph-1.0.4-SNAPSHOT-jar-with-dependencies.jar
  • 我下载了 Gremlin2.4 和 Rexster 2.4 二进制文件,并在(分别)lib 和 ext 文件夹中复制了 blueprints-arangodb-graph-1.0.4-SNAPSHOT-jar-with-dependencies.jar

然后我遇到了几个问题:

第一,(不是灯泡问题)我没有成功使 ArangoDB 与当前版本的 Gremlin (2.4.0) 和/或 Rexster (2.4.0) 一起正常工作

在 gremlin 2.4 中:

在 bash 中,启动 Rexster 2.4 时:

看到一些使用 Gremlin 和 Rexster 版本 2.2 的示例,我下载了它们并再次安装了 arangodb 蓝图驱动程序

这一次,它在 Gremlin 2.2 和 Rexster 2.2 中都有效:

  • gEcount() 返回了一些东西(<-> 因此被支持)
  • Rexster 服务器启动,我可以在端口 8182 上访问 Rexster api

但是,第二个问题是以下 Python 代码:

回来 :

我不知道如何解决这个问题(顺便说一句,我不是 Java 程序员)

这是我的环境:

  • Ubuntu 11.10
  • java版本“1.7.0_45”
  • Java(TM) SE 运行时环境 (build 1.7.0_45-b18)
  • Java HotSpot(TM) 64 位服务器 VM(内部版本 24.45-b08,混合模式)

这是我在 rexster.xml 中的 Arango 配置(让我可以从 Rexster REST API 访问 arangodb):

在此先感谢您的任何想法/帮助:)

0 投票
2 回答
635 浏览

python - 使用 Bulbs/python 和 Neo4j 2.0 的错误消息

使用 Neo4j 2.0 和 Python 2.7.6 - 我尝试执行几个基于 Bulbs 包的脚本,但不断收到以下错误:

我注意到一些错误消息中有额外的 EOL 字符。这可能是问题吗?

0 投票
2 回答
425 浏览

python - Rexster 使用 OrientDB 创建边缘错误

我正在使用pythonbulbs和。我正在尝试创建边缘,但出现此错误:RexsterOrientDB

有趣的是,当我再次执行命令时,它可以工作,但是我创建了 2 个边缘,这是错误的。

在我的Rexster服务器上,

我收到这个错误

我的图形配置

我不断收到的错误是什么,我该如何解决?

添加了调试信息:

0 投票
1 回答
821 浏览

gremlin - 使用灯泡和 rexster 批量/批量更新/插入?

我正在使用pythonbulbs和。RexsterOrientDB

有没有办法同时批量/批量更新/插入多个顶点或边?

0 投票
2 回答
767 浏览

python - 在 python 灯泡或 gremlin 中获取唯一的一组相邻顶点?

使用python,bulbsrexster

假设我有两个顶点,v0并且v1. 我从v0 -to-> v1. 目前在bulbslist(v0.outV())给了我一个 3 元素列表,所有v1. 有没有办法获得v0.outV()in bulbsor的唯一列表gremlin

注意:set(list(v0.outV()))不起作用,我不喜欢在 中删除重复项python,而是在图形服务器rexster

编辑:我正在使用rexsterwith orientDB,并且orientDBblueprint兼容的。

0 投票
2 回答
1399 浏览

python - 在函数python中传递带冒号的变量

我正在使用这个 api.. 它的函数调用如下所示:

现在请注意,标识符是一个我没有定义但由 api 解析的变量,值是一个字符串。

在 pymongo api 中也会发生类似的事情:http: //api.mongodb.org/python/current/tutorial.html

等于

test_database 在第一种情况下,即使用户没有定义该变量..但 mongo 理解在我的数据存储中,我是否有一个名为 test_database 的数据库..

现在,我遇到的问题是:我的数据存储中有一个冒号..

也就是说,它就像:

见..查询中的冒号..

而且这个api没有那个mongo类型的字典实现..

我知道,我应该解决这个问题,因为我为什么会得到这个冒号..但这就是我现在所坚持的..

问题是因为那个冒号,我明白了

我该如何解决这个问题