Max, this sounds like a version clash on Lucene. Can you check what version(s) of Lucene (and Neo4j-Index) you are running in the two scenarios?
Cheers, /peter neubauer COO and Sales, Neo Technology GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Mon, Aug 2, 2010 at 2:38 PM, Max Jakob <max.ja...@fu-berlin.de> wrote: > Hi, > > I have a problem with the LuceneIndexService. When I create an indexed > graph base and I commit it to disk, next time I want to use it, I get > a NoSuchMethodError for LuceneIndexService.getSingleNode: > > Exception in thread "main" java.lang.NoSuchMethodError: > org.apache.lucene.search.IndexSearcher.search(Lorg/apache/lucene/search/Query;)Lorg/apache/lucene/search/Hits; > at > org.neo4j.index.lucene.LuceneIndexService.searchForNodes(LuceneIndexService.java:430) > at > org.neo4j.index.lucene.LuceneIndexService.getNodes(LuceneIndexService.java:310) > at > org.neo4j.index.lucene.LuceneIndexService.getSingleNode(LuceneIndexService.java:469) > at > org.neo4j.index.lucene.LuceneIndexService.getSingleNode(LuceneIndexService.java:461) > > To illustrate this in more detail: if I run the code below for the > first time, everything goes fine. On a second run I get the exception. > Could somebody give me a hint where I'm going wrong? (re-indexing does > not work) Do I have to initialize the LuceneIndexService differently > if the index is already on disk? > > Thanks in advance for any advice you have, > Max > > > GraphDatabaseService graphDb = new EmbeddedGraphDatabase("gbDir"); > IndexService index = new LuceneIndexService(graphDb); > Transaction tx = graphDb.beginTx(); > try { > Node node = index.getSingleNode("name", "testName"); > if (node == null) { > node = graphDb.createNode(); > node.setProperty("name", "testName"); > index.index(node, "name", "testName"); > } > tx.success() > } > finally { > tx.finish(); > index.shutdown(); > graphDb.shutdown(); > } > _______________________________________________ > 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