Dear Experts,
I'm using NEO4J 2.1.4 on Redhat 6.4.
And have about 88K Person nodes.
match (x)
return labels(x), count(*)
+-----------------------+
| labels(x) | count(*) |
+-----------------------+
| ["Person"] | 87474 |
+-----------------------+
1 row
531 ms
They all have a personid.
And I have created a UNIQUE constraint on that field.
CREATE CONSTRAINT ON (p:Person) ASSERT p.personid IS UNIQUE
match (n)
return n
limit 100
...
|
Node[97]{personid:98,email:"[email protected]",name:"",enron:1,domainid:4058,msgrec_to:85,msgrec_tot:85}
|
|
Node[98]{personid:99,email:"[email protected]",name:"",enron:1,domainid:4058,msgrec_to:240,msgrec_tot:338,msgrec_cc:98}
|
|
Node[99]{personid:100,email:"[email protected]",name:"",enron:1,domainid:4058,msgrec_to:139,msgrec_tot:141,msgrec_cc:2}
|
+-------------------------------------------------------------------------------------------------------------------------------------------------------+
100 rows
65 ms
I've also auto indexed personid.
cat neo4j.properties
# Autoindexing
# 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=personid, senderid, recipientid
# Enable auto-indexing for relationships, default is false
relationship_auto_indexing=true
And updated the nodes, based on this thread:
http://stackoverflow.com/questions/12877678/neo4j-step-by-step-to-create-an-automatic-index
begin transaction
START nd =node(*)
WHERE has(nd.personid)
WITH nd
SET nd.personid = nd.personid
RETURN count(nd);
1 row
Properties set: 87474
71400 ms
commit
Transaction committed
----
But these queries don't find the node.
start a = node:node_auto_index(personid='100')
return a;
+---+
| a |
+---+
+---+
0 row
10 ms
-----
However, Match does find the node easily enough.
match (from)
where from.personid = 100
return from
+----------------------------------------------------------------------------------------------------------------------------------+
| from
|
+----------------------------------------------------------------------------------------------------------------------------------+
|
Node[99]{personid:100,email:"[email protected]",name:"",enron:1,domainid:4058,msgrec_to:139,msgrec_tot:141,msgrec_cc:2}
|
+----------------------------------------------------------------------------------------------------------------------------------+
1 row
224 ms
Is autoindexing not working correctly?
Do I need to do something else?
Has the syntax changed?
Thanks a lot!
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.