Skip to content
This repository has been archived by the owner on Mar 20, 2019. It is now read-only.

Indexes are not being created when you run neo4j-shell with -path #99

Open
kayrus opened this issue Sep 7, 2016 · 4 comments
Open

Indexes are not being created when you run neo4j-shell with -path #99

kayrus opened this issue Sep 7, 2016 · 4 comments

Comments

@kayrus
Copy link

kayrus commented Sep 7, 2016

When you run the following query:

CYPHER 1.9 START nd =node(*) WHERE has(nd.`text`) WITH nd SET nd.`text` = nd.`text` RETURN COUNT(nd);

using neo4j-shell with -path parameter (and stopped main neo4j server):

$ ./bin/neo4j-shell -path /var/lib/neo4j/data/graph.db -config /var/lib/neo4j/conf/neo4j-server.properties -file autoindex.neo4jshell

+-----------+
| COUNT(nd) |
+-----------+
| 59        |
+-----------+
1 row
Properties set: 59
1611 ms

The indexes don't work after you start the actual neo4j server.

When you start the neo4j server and run this query once again without the -path:

$ ./bin/neo4j-shell -config /var/lib/neo4j/conf/neo4j-server.properties -file autoindex.neo4jshell
+-----------+
| COUNT(nd) |
+-----------+
| 59        |
+-----------+
1 row
Properties set: 59
919 ms

indexes work fine and the data is correct.

here are the messages.log:

noserver
server

@jexp
Copy link
Owner

jexp commented Sep 8, 2016

You have to configure the same auto indexes in the server config.

Von meinem iPhone gesendet

Am 07.09.2016 um 12:22 schrieb kayrus [email protected]:

When you run the following query:

CYPHER 1.9 START nd =node(*) WHERE has(nd.text) WITH nd SET nd.text = nd.text RETURN COUNT(nd);
using neo4j-shell with -path parameter:

$ ./bin/neo4j-shell -path /var/lib/neo4j/data/graph.db -config /var/lib/neo4j/conf/neo4j-server.properties -file autoindex.neo4jshell

+-----------+
| COUNT(nd) |
+-----------+
| 59 |
+-----------+
1 row
Properties set: 59
1611 ms
The indexes don't work after you start the actual neo4j server.

When you start the neo4j server and run this query once again without the -path:

$ ./bin/neo4j-shell -config /var/lib/neo4j/conf/neo4j-server.properties -file autoindex.neo4jshell
indexes work fine and the data is correct.

here are the messages.log:

noserver
server


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@kayrus
Copy link
Author

kayrus commented Sep 8, 2016

@jexp it is:

# Auto-indexing
# Enable auto-indexing for nodes, default is false
node_auto_indexing=true

# The node property keys to be auto-indexed, if enabled
node_keys_indexable=text

@kayrus
Copy link
Author

kayrus commented Sep 8, 2016

@jexp also I didn't find any mention about these config options in the docs: https://neo4j.com/docs/2.3.7/configuration-settings.html

@kayrus
Copy link
Author

kayrus commented Sep 8, 2016

@jexp well, it looks like these options were deprecated. but how do they relate to the behavior I described in the first message? why indexes don't work when you create them in "single" (without actual neo4j server start) mode?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants