0

我正在尝试执行以下 Cypher 语句

"START b=node:customer_full_text_idx('ID:"ASHLAND"') return b

我正在使用这种方法

var results = _graphClient.QueryIndex<Customer>(Base.INDEX_CUSTOMER_FULL_TEXT, IndexFor.Node, "ID:" + "ASHLAND");

此方法有时会引发 Lucene 异常。此问题记录在https://bitbucket.org/Readify/neo4jclient/issue/54/spaces-in-search-text-while-searching-for中。QueryIndex 已弃用,我尝试了推荐的语法

我尝试使用推荐的 Cypher

var results = _graphClient
              .Cypher
              .Start(new { n = Node.ByIndexLookup(Base.INDEX_CUSTOMER_FULL_TEXT, "ID", "ASHLAND") })
              .Return<Customer>("n")
              .Results;

但是上面的语句没有返回任何结果。我认为问题在于上述语法不是为全文设计的,它在 Cypher 开头插入了“=”。而它期望 ID 和名称之间有一个“:”。或者可能是我遗漏了一些明显的东西。

请使用 .Start Query 分享使用 Neo4jClient 的任何示例。TIA。

4

1 回答 1

2

使用Node.ByIndexQuery而不是Node.ByIndexLookup.

(您之前使用过查询,然后换成新语法中的查找。)

这是一个查找:http ://docs.neo4j.org/chunked/snapshot/query-start.html#start-node-by-index-lookup

这是一个查询:http ://docs.neo4j.org/chunked/snapshot/query-start.html#start-node-by-index-query

于 2013-08-18T23:44:30.903 回答