Your code doesn't use the new index framework, but there might be a
CLASSPATH issue where the neo4j-index 1.1 uses lucene 2.9.2 and
neo4j-lucene-index 0.1-SNAPSHOT uses lucene 3.0.1. If you've got 'em both on
the classpath there might be problems, so please use the one or the other.
Or you could use neo4j-index 1.2-SNAPSHOT where this issue isn't a problem
anymore since it's updated to lucene 3.0.1 as well.

2010/9/24 Paddy <paddyf...@gmail.com>

> Hi,
> I got the following error when trying out the
> neo4j-lucene-index 0.1-SNAPSHOT with the BatchInserter, it worked ok when
> using the neo4j-index 1.1.
> The problem is when i call: indexService.getSingleNode("Id", "test");
> should
> i modify my code to use the new neo4j-lucene-index with
> the the BatchInserter?
>
> Thanks
> Paddy
>
> 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.LuceneIndexBatchInserterImpl.getNodes(LuceneIndexBatchInserterImpl.java:239)
> at
>
> org.neo4j.index.lucene.LuceneIndexBatchInserterImpl.getSingleNode(LuceneIndexBatchInserterImpl.java:279)
> at neo4j.indexTest2.main(indexTest2.java:42)
>
>
> public class indexTest2 {
> static GraphDatabaseService gds;
> static LuceneFulltextIndexBatchInserter indexService;
> static BatchInserter inserter;
>
> public static void setup() {
> inserter = new BatchInserterImpl("data/neodb/neodb-tmp", BatchInserterImpl
> .loadProperties("neo4j_config.props"));
> indexService = new LuceneFulltextIndexBatchInserter(inserter);
>
> }
>
> public static void main(String[] args) {
> setup();
>
> Map<String, Object> nodeProperties = new TreeMap<String, Object>();
> nodeProperties.put("Id", "test");
> long node = inserter.createNode(nodeProperties);
> indexService.index(node, "Id", "test");
>
> long search = indexService.getSingleNode("Id", "test");
> System.out.println("Search" + search);
>
> inserter.shutdown();
> indexService.optimize();
> indexService.shutdown();
>
> }
> }
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to