Georg, if there is a use case where you would like to query all these
different entities in the same way, it sounds like there is a commonality
between them. Like, in a model of lego and barbie and model cars, those are
all all queryable as "Toys".

I would try and find that commonality, label all things that share it with
that, and add an index there.

The indexes in neo do not require all entries to share the same type, you
can mix property types within the same index.

jake

Sent from my phone, please excuse typos and brevity.
On Mar 15, 2014 2:25 AM, "Michael Hunger" <[email protected]>
wrote:

> Hi Georg,
>
> what's your use case for this?
>
> 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? :)
>
>
> #1 no that I know of
> #2 IN is not yet supported for index lookups (as is OR) but it is planned
> to be added
> #3 I'd say for arrays if that's the behavior you want then yes, all is good
>
> Cheers
>
> Michael
>
>
>
>
> Am 21.02.2014 um 12:25 schrieb Georg Summer <[email protected]>:
>
> 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.
>
>
>  --
> 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