0
我嘗試使用Neo4jClient爲.NET中的Neo4j我NameIndex執行查詢執行索引的Cypher查詢,但我得到這個錯誤:掙扎在Neo4jClient.NET
{"Received an unexpected HTTP status when executing the request.\r\n\r\nThe response status was: 500 Internal Server Error\r\n\r\nThe raw response body was: {\"exception\":\"NullPointerException\",\"stacktrace\":[\"org.apache.lucene.util.SimpleStringInterner.intern(SimpleStringInterner.java:54)\",\"org.apache.lucene.util.StringHelper.intern(StringHelper.java:39)\",\"org.apache.lucene.index.Term.<init>(Term.java:38)\",\"org.apache.lucene.queryParser.QueryParser.getFieldQuery(QueryParser.java:643)\",\"org.apache.lucene.queryParser.QueryParser.Term(QueryParser.java:1421)\",\"org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:1309)\",\"org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:1237)\",\"org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:1226)\",\"org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:206)\",\"org.neo4j.index.impl.lucene.IndexType.query(IndexType.java:300)\",\"org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:227)\",\"org.neo4j.server.rest.web.DatabaseActions.getIndexedNodesByQuery(DatabaseActions.java:977)\",\"org.neo4j.server.rest.web.DatabaseActions.getIndexedNodesByQuery(DatabaseActions.java:960)\",\"org.neo4j.server.rest.web.RestfulGraphDatabase.getIndexedNodesByQuery(RestfulGraphDatabase.java:692)\",\"java.lang.reflect.Method.invoke(Unknown Source)\"]}"}
我的方法如下所示:
public IEnumerable GraphGetNodeByName(string NodeName)
{
GraphOperationsLogger.Trace("Now entering GraphGetNodeByName() method");
IEnumerable QueryResult = null;
GraphOperationsLogger.Trace("Now performing the query");
var query = client_connection.QueryIndex<GraphNode>("NameIndex", IndexFor.Node,
//Here I want to pass in the NodeName into the query
//@"Start n = node:NameIndex(Name = '"+ NodeName +"') return n;");
//Here I am hard-coding the NodeName
@"Start n = node:NameIndex(Name = ""Mike"") return n;");
QueryResult = query.ToList();
return QueryResult;
}
我非常想在節點名傳遞到查詢,但不工作,因此我試圖硬編碼的,並且也不起作用。兩種情況都會產生相同的錯誤信息?
謝謝哥們,你肯定是不錯的。什麼是Neo4jClient for .NET的最新版本? –
最新版本列於http://nuget.org/packages/Neo4jClient。我們經常發佈 - 有時每天多次發佈。查看該頁面上的版本歷史記錄表。 –