Let's say we have a mixed set of nodes that represent different types. All 
of these nodes have multiple properties. Some of these properties are 
arrays with ids of these types.

node1.foonames = ["name1", "othername1",...]
node1.ids = ["id1","yetanotherid1", ...]

node2.barnames = ["name2"]
node2.ids = ["id2","otherid2","yetanotherid2"]


I would like to be able to universally query all the names and ids. 
(Imaging the names and ids come from different sources)

Before 2.x I would just push all the names and ids in an 
index.forNodes("idindex").add(node1,"id",...). Then I could just use that 
index in cypher (START n=node:idindex(id={'name2'}) ..) to get the nodes I 
want.
>From what I heard and read in blogs, etc Neo4j wants to phase out this 
functionality eventually.

So in a Label-world I would make something like:

create index on :Indexed(indexed)

node1.label = Indexed
node1.indexed =["name1", "othername1",...,"id1","yetanotherid1", ...]
node1.ids =["id1","yetanotherid1", ...]
node1.names=["name1", "othername1",...]
// same for node2

and then query in cypher: 
match (n:Indexed) where "name1" in n.indexed return n

So my questions are:
1. Can I make an index that encompasses multiple properties but behaves as 
if it was just one?
2. does the index actually help me in the  where "name1" in n.indexed case?
3. any alternative ideas? Or is legacy indexing still cool and I do not 
have to feel ashamed of it? :)

Georg


-- 
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/groups/opt_out.

Reply via email to