What value is your uuid in that case? is it probably null or empty? Can we see the final query string?
Am 07.10.2011 um 20:25 schrieb dieter_f...@gmx.net: > Hi everybody, > > I want to query the Index with the Method query(String). Therefore, I build > my query and execute the method: > > StringBuffer query = new StringBuffer(); > ... > query.append(" AND "); > query.append("UUID:"); > query.append("MUST_NOT "); > query.append("\"" + uuid + "\""); > > IndexHits<Node> hits = nodeIndex.query(query.toString()); > > This leads to the following Exception: > > Exception in thread "main" java.lang.NullPointerException > at > org.apache.lucene.util.SimpleStringInterner.intern(SimpleStringInterner.java:54) > at org.apache.lucene.util.StringHelper.intern(StringHelper.java:36) > at org.apache.lucene.index.Term.<init>(Term.java:38) > at > org.apache.lucene.queryParser.QueryParser.getFieldQuery(QueryParser.java:643) > at > org.apache.lucene.queryParser.QueryParser.getFieldQuery(QueryParser.java:752) > at org.apache.lucene.queryParser.QueryParser.Term(QueryParser.java:1556) > at > org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:1309) > at > org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:1266) > at > org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:1226) > at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:206) > at org.neo4j.index.impl.lucene.IndexType.query(IndexType.java:281) > at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:207) > at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:218) > at testdata.ReadTestData.listInformation(ReadTestData.java:112) > at testdata.ReadTestData.main(ReadTestData.java:153) > > The syntax of the build query is correct - at least it executes in Luke > (https://code.google.com/p/luke/) without complaining. > > Am I doing something wrong or did I miss something? > > Cheers, > > Didi > -- > Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir > belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de > _______________________________________________ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user