Hi, I'm trying to upgrade to neo4j 3.1.1 from 2.3.1 and I'm getting an error when trying to open a index on a read only embedded database. Here is some sample code:
GraphDatabaseService graphDb = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder(new File("/path/to/neo4j/graph/db")) .setConfig(GraphDatabaseSettings.read_only, "true").newGraphDatabase(); try (Transaction tx = graphDb.beginTx()) { IndexManager indexManager = graphDb.index(); Index<Node> nodeIndex = indexManager.forNodes("atlas"); indexHits = nodeIndex.get("atlasId", "13009140"); assertEquals(1, indexHits.size()); } This used to work fine in 2.3.1, but now it throws the following exception: org.neo4j.graphdb.security.WriteOperationsNotAllowedException: No write operations are allowed on this database. This is a read only Neo4j instance. at org.neo4j.kernel.impl.factory.ReadOnly.assertCanWrite(ReadOnly.java:30) at org.neo4j.kernel.impl.api.KernelStatement.dataWriteOperations(KernelStatement.java:115) at org.neo4j.kernel.impl.coreapi.IndexProviderImpl.getOrCreateNodeIndex(IndexProviderImpl.java:52) at org.neo4j.kernel.impl.coreapi.IndexManagerImpl.forNodes(IndexManagerImpl.java:81) at org.neo4j.kernel.impl.coreapi.IndexManagerImpl.forNodes(IndexManagerImpl.java:75) ... I don't understand why IndexManagerImpl.forNodes is calling IndexProviderImpl.getOrCreateNodeIndex. I'm not trying to create any nodes, I just want to search the existing node index. How do I search an index in a read only embedded graph database with neo4j 3.1.1? Thanks in advance for any help. -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.