it's unfortunate side-effect that the indexFor() method is a writing
method, i.e. if the index with that name doesn't yet exist it is created.

I think you might be able to get the read only index via the underlying
Kernel API

you have to cast GraphDatabaseService into
Statment st =
(GraphDatabaseAPI).getDependencyResolver().resolveDepencency(ThreadToContextStatementBridge.class).get();
st.readOperations().nodeLegacyIndexGet(st, key, value);

or query

java/org/neo4j/kernel/impl/api/OperationsFacade.java
1202:    public LegacyIndexHits nodeLegacyIndexGet( String indexName,
String key, Object value )
1206:        return legacyIndexRead().nodeLegacyIndexGet( statement,
indexName, key, value );
1359:    public Map<String,String> nodeLegacyIndexGetConfiguration( String
indexName )
1363:        return legacyIndexRead().nodeLegacyIndexGetConfiguration(
statement, indexName );


On Wed, Mar 1, 2017 at 5:12 PM, Jim <jtmckin...@gmail.com> wrote:

> I asked on stackoverflow here:
>
> http://stackoverflow.com/questions/42307586/search-a-
> read-only-embedded-neo4j-index-with-neo4j-3-1-1
>
> but I'm not getting any responses so I thought I would try here.
>
> How do I search a read only embedded neo4j index with neo4j 3.1.1?  My
> code that used to work with 2.3.1 now throws a
> WriteOperationsNotAllowedException when I try to use the index on a graph
> database that was opened read only.  I'm not trying to change anything in
> the database, I only want to search using the index.  How can I do this?
> Thanks in advance for any help.
>
> Jim
>
> --
> 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.
>

-- 
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.

Reply via email to