Lots of questions in one mail. My answers are inline.

On Mon, Jun 27, 2011 at 10:55 PM, Adrian Stabiszewski <
[email protected]> wrote:

> Hi!
>
> I'm currently evaluating Neo4J for a project, but I'm not sure if it is the
> right solution. Maybe you could help me by looking at my scenario. I have
> ca. 10 different types of nodes with properties which have directed
> relationships. Some types can only be connected to other types but others
> can also be connected to the same type (not the same node, circle relations
> are not allowed).
> Basically it looks like this:
>
> A->B->C->D->E or A->B->B->B->C->E or A->B->C->C->E
> Where each letter is a node type not the entity.
>
> Now, a common request for reporting is to find all nodes with specific
> properties that are connected.
>
> I tried to import all the data into a Neo4J DB and played around with the
> Cypher Query language, but without success.
> My basic idea of a query is like:
>
> start c=(typeIndex,node_type,"C"), e=(typeIndex,node_type,"E")
> match(c)-->(e) where (c.node_name = "name") return c,e
>
> This only works if C and E have a direct relationship. I'm looking for all
> the E's that are somehow connected to C. Is this possible? Will it be
> possible in the near future?
>

It is not possible now. It is however something that we want to have. We're
closing in on the next stable release, and variable length connections are
not going to make it into 1.4. It should be available soon after though, if
nothing shakes the plan as we now know it.


> I know I can traverse the graph myself, but this would take too long. The
> above query takes some 10 seconds, which is also too long.
>

10 seconds? I'd love to know more about this. How many C nodes do you have?
How many E nodes? Does it take ten seconds with cold or with warm caches?


> BTW: Some remarks about Cypher Query.
> With the current syntax it is not possible to have dots in the property
> name
> or at least I don't know how to escape them.
>

This should work for you: start a = (1) return a.`n.a.m.e`


> I also had trouble (SyntaxError) to use the alternative start query with
> index and query (4.1.4. Node by index query). Is this implemented yet?
> How can one use indices in WHERE and MATCH statements?
>

There are reasons why we have chosen not to expose things like index queries
in the MATCH and WHERE statement. What is it that you are trying to do?
Maybe I can help you figure out a better way of doing it?

Thanks for the feedback!

Andrés
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to