0
我正在使用Neo4j 2.0.0-M06社區版。爲什麼我在使用Neo4j模式索引時不返回任何結果?
我創建了以下架構指數
CREATE INDEX ON :Merchant(MerchantId);
該查詢返回25個結果,每一個人口MERCHANTID。
MATCH (m:Merchant) RETURN m LIMIT 25
如果我選擇一個MerchantId進行篩選並將其粘貼到另一個查詢中,則會得到0個結果。
MATCH (m:Merchant)
WHERE m.MerchantId = "1"
RETURN m
如果我運行一個查詢與NULL MERCHANTID選擇的第一個25個招,我得到25個結果
MATCH (m:Merchant)
WHERE m.MerchantId IS NULL
RETURN m
LIMIT 25
奇怪的是,如果我看的提琴手我收到我明確排除的結果!
"results":[{"columns":["m"],"data":[
{"row":[{"MerchantId":"1"}],"graph":{"nodes":[{"id":"2696940","labels":["Merchant"],"properties":{"MerchantId":"1"}}],"relationships":[]}},
{"row":[{"MerchantId":"2"}],"graph":{"nodes":[{"id":"2696941","labels":["Merchant"],"properties":{"MerchantId":"2"}}],"relationships":[]}},
{"row":[{"MerchantId":"3"}],"graph":{"nodes":[{"id":"2696942","labels":["Merchant"],"properties":{"MerchantId":"3"}}],"relationships":[]}},
...................
這是什麼原因?
你可以使用':schema'命令檢查索引狀態嗎?也嘗試刪除並重新創建索引。如果您在'data/log/*。log'或'data/graph.db/messages.log'中發現任何錯誤消息,請分享它們。 –
@MichaelHunger謝謝你的建議。索引處於聯機狀態,並且在任何日誌文件中都沒有有用的消息。在爲此奮鬥了幾個小時並且抓住了吸管之後,我檢查了文本文件的編碼,結果證明是這個問題。 – Cory