1

私はサイファーで次のクエリを試しました。

START other=node(*)
WHERE other.FirstName =~ "(?i)dh.*" AND other.UserID <> 1 
WITH other, me=node:node_auto_index(UserID = '1')
MATCH me-[myR:friends]-(x)
RETURN other.UserID, other.UserName, other.FirstName, other.LastName, other.ImagePath 
       // myR.ApprovalStatus, COUNT(distinct pMutualFriends) AS mutualFriends
//ORDER BY mutualFriends DESC
LIMIT 100;

しかし、それは私にエラーを与えています。

These columns can't be listen in the WITH statement without renaming: me=node

では、このクエリの何が問題なのですか?

4

1 に答える 1

2

これを行うには、別の START 句を実行する必要があります。

START other=node(*)
WHERE other.FirstName =~ "(?i)dh.*" AND other.UserID <> 1 
WITH other
START me=node:node_auto_index(UserID = '1')
MATCH me-[myR:friends]-(x)
RETURN other.UserID, other.UserName, other.FirstName, other.LastName, other.ImagePath 
   // myR.ApprovalStatus, COUNT(distinct pMutualFriends) AS mutualFriends
//ORDER BY mutualFriends DESC
LIMIT 100;

それは構文的に正しいはずです。あなたのクエリが何をしようとしているのか正確にはわかりません.2つのクエリが a でリンクされていないため、正しくないと感じます.結果でと/matchのデカルト積を取得します.othermex

于 2013-07-29T12:35:57.387 に答える