Good question,

You could also create an UID index for each of your node-labels.

When you query for nodes via their UID do you know their type (i.e. main label) 
too? Then that would make sense.

Otherwise the approach suggested by you (with a generic "Node") label would 
work if you need a generic lookup facility by UID (what's the use-case for that 
context-free-lookup?)

Cheers,

Michael

----
(michael}-[:SUPPORTS]->(YOU)-[:USE]->(Neo4j)
Learn Online, Offline or Read a Book (in Deutsch)
We're trading T-shirts for cool Graph Models






Am 10.03.2014 um 16:32 schrieb brian <[email protected]>:

> Hello,
> 
> This question pertains to Neo4j 2.0+
> 
> I am generating a GUID property (and some other "standard" properties) for 
> all Nodes when the Node is created..  This is done in a 
> TransactionEventHandler plugin. Since many of our Node lookups are by GUID, 
> I'd like to index that property for all Nodes. However, it appears that you 
> can create indexes only for specific labels.  So what is the best strategy 
> for accomplishing this?
> 
> Add some generic label (e.g. 'Node') to every Node and put the index on that 
> label.  This could be done in my TransactionEventHandler.
> Use Lucene indexes.  This is actually what I've been doing since Neo4j 1.8.  
> This is cumbersome because my code needs to know that for some properties a 
> START clause on some auto index needs to be included, but for other queries a 
> WHERE clause is sufficient.  I'd like to eliminate the use of START clauses 
> where possible and rely on WHERE clauses and proper indexing.
> Other?
> Any chance that indexes on all Nodes (and hopefully some day Relationships) 
> without requiring a label will be supported in the future?
> 
> Thanks.
> 
> -brian
> 
> 
> -- 
> 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.

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

Reply via email to