Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Cypher Simple Paths
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  10 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Rehan  
View profile  
 More options Oct 9 2012, 6:15 am
From: Rehan <rehan.az...@gmail.com>
Date: Tue, 9 Oct 2012 03:15:25 -0700 (PDT)
Local: Tues, Oct 9 2012 6:15 am
Subject: Cypher Simple Paths

Hi,

I am using below query to get all possible paths between two nodes:

START a=node:node_auto_index(name="A") , m=node:node_auto_index(name="M") MATCH p
=a-[*]-m  WHERE ALL(r in RELS(p) WHERE (r.value >= 200 OR r.value=0) )RETURN p ORDER BY length
(p) desc limit 20

This query returns the results with loops as well i.e. paths contains loop.
How can I restrict  this to return only simple paths.

Br ,

Rehan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rehan  
View profile  
 More options Oct 9 2012, 6:20 am
From: Rehan <rehan.az...@gmail.com>
Date: Tue, 9 Oct 2012 03:20:39 -0700 (PDT)
Local: Tues, Oct 9 2012 6:20 am
Subject: Re: Cypher Simple Paths

UpDate:

My Nodes have multiple relationships of same type with each other.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Neubauer  
View profile  
 More options Oct 9 2012, 10:38 am
From: Peter Neubauer <peter.neuba...@neotechnology.com>
Date: Tue, 9 Oct 2012 16:38:02 +0200
Local: Tues, Oct 9 2012 10:38 am
Subject: Re: [Neo4j] Re: Cypher Simple Paths
You could for instance exclude paths that have m or a as one of the
nodes? http://docs.neo4j.org/chunked/snapshot/query-function.html#_collectio...

Let me know if you need an example, I think I can craft one ...

Cheers,

/peter neubauer

G:  neubauer.peter
S:  peter.neubauer
P:  +46 704 106975
L:   http://www.linkedin.com/in/neubauer
T:   @peterneubauer

Neo4j 1.8 GA - http://www.dzone.com/links/neo4j_18_release_fluent_graph_literacy.html


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rehan Azher  
View profile  
 More options Oct 9 2012, 11:26 pm
From: Rehan Azher <rehan.az...@gmail.com>
Date: Wed, 10 Oct 2012 11:26:28 +0800
Local: Tues, Oct 9 2012 11:26 pm
Subject: Re: [Neo4j] Re: Cypher Simple Paths

Hi Peter,

Can you help t craft one such query. please.

Thanks and Best Regards,

--
Rehan Azher
Cell: +65 92967887

On Tue, Oct 9, 2012 at 10:38 PM, Peter Neubauer <


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wes Freeman  
View profile  
 More options Oct 10 2012, 3:54 am
From: Wes Freeman <freeman....@gmail.com>
Date: Wed, 10 Oct 2012 03:54:21 -0400
Local: Wed, Oct 10 2012 3:54 am
Subject: Re: [Neo4j] Re: Cypher Simple Paths

This is a bit of an abomination--there should be a better way--but you
might be able to use it to get simple paths:

http://console.neo4j.org/r/1jiuaf

If you want to see the cyclic paths, take out the where clause.

Wes


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rehan  
View profile  
 More options Oct 10 2012, 11:43 pm
From: Rehan <rehan.az...@gmail.com>
Date: Wed, 10 Oct 2012 20:43:47 -0700 (PDT)
Local: Wed, Oct 10 2012 11:43 pm
Subject: Re: [Neo4j] Re: Cypher Simple Paths

Thanks WES, what if we want to add a filter on relationship as well. i.e.
property with value <=200.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wes Freeman  
View profile  
 More options Oct 11 2012, 5:07 am
From: Wes Freeman <freeman....@gmail.com>
Date: Thu, 11 Oct 2012 05:07:11 -0400
Local: Thurs, Oct 11 2012 5:07 am
Subject: Re: [Neo4j] Re: Cypher Simple Paths

You could add that in to the WHERE clause with an AND, just like you had it
in the original query.

Wes


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rehan  
View profile  
 More options Oct 11 2012, 9:46 pm
From: Rehan <rehan.az...@gmail.com>
Date: Thu, 11 Oct 2012 18:46:34 -0700 (PDT)
Local: Thurs, Oct 11 2012 9:46 pm
Subject: Re: [Neo4j] Re: Cypher Simple Paths

Hi Wes,

Thank you .

One more query is it possible to build a query which should not include a
given path .

Thanks and Best Regards,

Rehan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wes Freeman  
View profile  
 More options Oct 11 2012, 10:11 pm
From: Wes Freeman <freeman....@gmail.com>
Date: Thu, 11 Oct 2012 22:11:25 -0400
Local: Thurs, Oct 11 2012 10:11 pm
Subject: Re: [Neo4j] Re: Cypher Simple Paths

Probably. The question is, how do you know which path you don't want to
include?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wes Freeman  
View profile  
 More options Oct 11 2012, 10:27 pm
From: Wes Freeman <freeman....@gmail.com>
Date: Thu, 11 Oct 2012 22:27:06 -0400
Local: Thurs, Oct 11 2012 10:27 pm
Subject: Re: [Neo4j] Re: Cypher Simple Paths

You can do something like this, which is pretty straightforward:

http://console.neo4j.org/r/i945yw


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »