English 中文(简体)
如何通过javascript REST客户处理新4j服务器的指数?
原标题:How to handle indices in Neo4j server via javascript REST client?

我有一个独立的Ned4j REST服务器,包括一个节点索引。 我想纯的贾瓦底客户能够与新4j连接起来,并为格式数据服务,即建立在诺德.js之上的视觉图书馆。

陪审团 DB非常受欢迎,但新4j的实施是“重”的:

The next most popular option on github is: https://github.com/thingdom/node-neo4j looking at the method definitions https://github.com/thingdom/node-neo4j/blob/develop/lib/GraphDatabase._coffee

I m 能够使用“植被: (id,__)->”

> node1 = db.getNodeById(12, callback);

该产出从REST服务器中回收,包括代用品。 令人憎恶。

I can t figure out how to use "getIndexedNodes: (index, property, value, _) ->"

> indexedNodes = db.getIndexedNodes:(index1, username, Homer, callback);
...

指数 无。 我尝试了几个不同的组合。 无。 我如何利用这一指挥?

此外,获得的电离层需要一种关键值的配对。 是否有办法获得所有物品,或者在指数中排出一个子类别而无漏洞?

最佳回答

Node-neo4j的作者/主人之一。

指数 无。 我尝试了几个不同的组合。 无。 我如何利用这一指挥?

你的例子似乎有一些同学错误。 index1,usernameHomer在其他地方界定的变量? 假设这些是实际指数名称、财产名称和价值,则需要将其引为说明字面,例如index1 、用户名。 Homer 。 但是,在开母脑之前,你也享有殖民地权利。 (导致Node.js REPL无法理解你的指挥。)

Then, note that indexedNodes should be undefined -- getIndexedNodes(), like most Node.js APIs, is asynchronous, so its return value is undefined. Hence the callback parameter.

你们可以看到以下实例:get IndexedNodes()在样本中使用:node-neo4j-template。 参考文献:

https://github.com/aseemk/node-neo4j-template/blob/2012-03-01/models/user.js#L149-L160”rel=“nofollow”>https://github.com/aseemk/node-neo4j-template/blob/2012-03-01/models/user.js#L149-L160

此外,获得的电离层需要一种关键值的配对。 是否有办法获得所有物品,或者在指数中排出一个子类别而无漏洞?

get IndexedNodes(>> 确实交还了所有配对节点,因此不需要住宿。 直接由新4j s REST AP支持,但你可以取得以下成果:

E.g. to return the 6th-15th user (assuming they have a type property set to user) sorted alphabetically by username:

db.query([
   START node=node:index1(type="user") ,
   RETURN node ORDER BY node.username ,
   SKIP 5 LIMIT 10 
].join( 
 ), callback);

热带风暴仍在迅速发展,但可以肯定地参考与你重新使用的新4j版本相对应的文件。

如上所述,总体上看看node-neo4j-template

Hope this helps. =)

问题回答

2. 新4j 2 允许你采用国际投资政策指数。 页: 1

http://docs.neo4j.org/chunked/stable/rest-api-unique-indexes.html”rel=“nofollow”





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签