Re: [Neo4j] Neoclipse on OS X Lion

2011-11-24 Thread Anders Nawroth
Hi!

I just updated the IMDB example to use Neo4j 1.5, the code is here:
https://github.com/neo4j-examples/imdb
(the wiki says otherwise ... I'll fix that)

Neoclipse 1.5 is available here:
http://neo4j.org/download/

Neoclipse is tied to specific Neo4j versions, and if an database needs 
to be updated to a more recent format, that has to happen outside of 
Neoclipse for now.

/anders

On 11/23/2011 09:00 PM, Stefan Arentz wrote:

 On 2011-11-23, at 12:35 PM, Stefan Arentz wrote:

 When running Neoclipse on Lion (10.7.2) with the latest Java 10.6, the 
 Eclipse menu bar is missing. Is this a known problem? Is there a workaround?

 Ahh so it seems the tool does not actually have a menu bar. To open a 
 database you have to go to the settings and change the database location. Hmm.

 Is there a way to make this work with the IMDB demo? It complains about the 
 DB format not being the same (0.9.8?).

 I thought this was a generic tool to open existing databases and browse them 
 visually. That would help me debug / understand some things in a big way I 
 think.

   S.

 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] allSimplePaths performance

2011-11-24 Thread Petar Dobrev
Hi guys,

I have a graph of about 2.5M nodes and 8M relationships and I am trying to
find all simple paths between two nodes with maximum depth of 8.

The allSimplePaths graph algo works well for maximum depth of 5, but for 8
it runs really long (I didn't even wait for it to finish). So I thought
it's just that the graph is too complicated and the search operation is
very expensive.

On the other hand I noticed that shortestPath and pathsWithLength both work
fast. So I tried this experiment:

   - Run shortestPath and record the shortest length
   - Iterate from the shortest length to max_depth
  - Run pathsWithLength and append the results
  -

And it turns out to be working really well.. much, much faster than the
allSimplePaths solution, which I found quite baffling, since the latter
solution should be doing more work to accomplish the same task.

Maybe it's just with my graph, but it's still weird.

Best regards,
Petar
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] allSimplePaths performance

2011-11-24 Thread Peter Neubauer
Petar,
very cool if this worked out. Maybe you could write up a testcase that
verifies that the results are the same, and then put this as a fork to
the graphalgo package? Sounds like a great addition if this works out?

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org              - NOSQL for the Enterprise.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.



On Thu, Nov 24, 2011 at 11:42 AM, Petar Dobrev peter.dob...@gmail.com wrote:
 Hi guys,

 I have a graph of about 2.5M nodes and 8M relationships and I am trying to
 find all simple paths between two nodes with maximum depth of 8.

 The allSimplePaths graph algo works well for maximum depth of 5, but for 8
 it runs really long (I didn't even wait for it to finish). So I thought
 it's just that the graph is too complicated and the search operation is
 very expensive.

 On the other hand I noticed that shortestPath and pathsWithLength both work
 fast. So I tried this experiment:

   - Run shortestPath and record the shortest length
   - Iterate from the shortest length to max_depth
      - Run pathsWithLength and append the results
      -

 And it turns out to be working really well.. much, much faster than the
 allSimplePaths solution, which I found quite baffling, since the latter
 solution should be doing more work to accomplish the same task.

 Maybe it's just with my graph, but it's still weird.

 Best regards,
 Petar
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Spatial build / run problems

2011-11-24 Thread danielb
Hi Peter,

I now have a graph with the 'geom' index + testnode from the above code and
imported some OSM data afterwards. I now want to find 2 nodes by bbox query
- 550349 and 205372 (see http://dl.dropbox.com/u/18693700/graph.png). How
can I achieve this? If I query for the bbox I should at least find the
corresponding GEOM nodes and then traverse over the incoming edge?

I can for example do the following:
cypher start n=node:node(way_osm_id = '119810554')
cypher return n
cypher 
==
+--+
== | n 
  
|
==
+--+
== |
Node[550349]{way_osm_id-119810554,oneway-BOTH,timestamp-1309673329000,highway-residential,name-Frauenstraße,version-2}
|
==
+--+
== 1 rows, 168 ms

In the posts before I could query the geometry with index 'geom'. The index
manager only has the following entries:

node lucene {_blueprints:type:MANUAL, type:exact}
relation lucene {_blueprints:type:MANUAL, type:exact}
geom spatial {_blueprints:type:MANUAL}
way lucene {_blueprints:type:MANUAL, type:exact}
changeset lucene {_blueprints:type:MANUAL, type:exact}
user lucene {_blueprints:type:MANUAL, type:exact}

I also have uploaded the complete folder of Neo4j spatial + graph.db:
http://dl.dropbox.com/u/18693700/neo4j_spatial_osm_graphdb.rar

Regards, Daniel

  

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Spatial-build-run-problems-tp3515519p3533548.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Neo4j Data Capacities

2011-11-24 Thread bm3780
I've read that Neo4j has data capacity limitations
(http://docs.neo4j.org/chunked/milestone/capabilities-capacity.html).  I
would like to confirm my understandings that the node, properties, and
relationships limitations are for each type (e.g. AND condition), not an
either/or  (e.g. OR condition).

Neo4j can hold:
   * ~34 billions nodes, AND
   * ~34 billion relationships, AND
   * ~68 billion properties

So I could theoretically have a single graph with 34 billion nodes, where
each node had two properties and a single relationship.

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Data-Capacities-tp3533552p3533552.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Spatial build / run problems

2011-11-24 Thread Peter Neubauer
Daniel,
the OSM import is loaded into its own layer corresponding to the
dataset file name as a default I think (there should be a layer node
created fro it, much in the same way as for the 'geom' index. So, if
you load that layer the same way as an index provider as you did with
the 'geom' index, you should be able to do just that.

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org              - NOSQL for the Enterprise.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.



On Thu, Nov 24, 2011 at 1:52 PM, danielb danielbercht...@gmail.com wrote:
 Hi Peter,

 I now have a graph with the 'geom' index + testnode from the above code and
 imported some OSM data afterwards. I now want to find 2 nodes by bbox query
 - 550349 and 205372 (see http://dl.dropbox.com/u/18693700/graph.png). How
 can I achieve this? If I query for the bbox I should at least find the
 corresponding GEOM nodes and then traverse over the incoming edge?

 I can for example do the following:
 cypher start n=node:node(way_osm_id = '119810554')
 cypher return n
 cypher
 ==
 +--+
 == | n
 |
 ==
 +--+
 == |
 Node[550349]{way_osm_id-119810554,oneway-BOTH,timestamp-1309673329000,highway-residential,name-Frauenstraße,version-2}
 |
 ==
 +--+
 == 1 rows, 168 ms

 In the posts before I could query the geometry with index 'geom'. The index
 manager only has the following entries:

 node lucene {_blueprints:type:MANUAL, type:exact}
 relation lucene {_blueprints:type:MANUAL, type:exact}
 geom spatial {_blueprints:type:MANUAL}
 way lucene {_blueprints:type:MANUAL, type:exact}
 changeset lucene {_blueprints:type:MANUAL, type:exact}
 user lucene {_blueprints:type:MANUAL, type:exact}

 I also have uploaded the complete folder of Neo4j spatial + graph.db:
 http://dl.dropbox.com/u/18693700/neo4j_spatial_osm_graphdb.rar

 Regards, Daniel



 --
 View this message in context: 
 http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Spatial-build-run-problems-tp3515519p3533548.html
 Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Data Capacities

2011-11-24 Thread Peter Neubauer
Yes.
However, before that you will probably run into other limitations,
like file sizes, IO and RAM. That is why we are a bit careful about
just going to Longs or UUIDs.

Anything you are thinking of in particular?

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org              - NOSQL for the Enterprise.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.



On Thu, Nov 24, 2011 at 1:55 PM, bm3780 bm3...@gmail.com wrote:
 I've read that Neo4j has data capacity limitations
 (http://docs.neo4j.org/chunked/milestone/capabilities-capacity.html).  I
 would like to confirm my understandings that the node, properties, and
 relationships limitations are for each type (e.g. AND condition), not an
 either/or  (e.g. OR condition).

 Neo4j can hold:
   * ~34 billions nodes, AND
   * ~34 billion relationships, AND
   * ~68 billion properties

 So I could theoretically have a single graph with 34 billion nodes, where
 each node had two properties and a single relationship.

 --
 View this message in context: 
 http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Data-Capacities-tp3533552p3533552.html
 Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Data Capacities

2011-11-24 Thread Michael Hunger
Correct,

is this an issue for your domain/data model?

If so could you something about your use-case / context?

Thanks a lot

Michael

Am 24.11.2011 um 13:55 schrieb bm3780:

 I've read that Neo4j has data capacity limitations
 (http://docs.neo4j.org/chunked/milestone/capabilities-capacity.html).  I
 would like to confirm my understandings that the node, properties, and
 relationships limitations are for each type (e.g. AND condition), not an
 either/or  (e.g. OR condition).
 
 Neo4j can hold:
   * ~34 billions nodes, AND
   * ~34 billion relationships, AND
   * ~68 billion properties
 
 So I could theoretically have a single graph with 34 billion nodes, where
 each node had two properties and a single relationship.
 
 --
 View this message in context: 
 http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Data-Capacities-tp3533552p3533552.html
 Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Data Capacities

2011-11-24 Thread bm3780
I'm struggling to determine whether graph is a good fit for my domain.  Most
of my application is structured data.  However, there are some parts that
are of a social nature and a graph seems like a good match.  I guess my fear
is having all of the data in a single store, such as a graph, would cause
problems down the road due to the limitations.

Potentially I need to go down the path of polyglot persistence...storing
just the social aspect of my data in the graph and storing the other data in
a document store.  I was try trying to simply our architecture by using only
a graph, which would make OM much easier down the road.

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Data-Capacities-tp3533552p3533597.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Data Capacities

2011-11-24 Thread Chris Gioran
Yes, this is true, with a few notes:

ID reuse complicates things a bit, meaning that if you delete nodes
and relationships some ids will remain unused until you restart the
database. Unclean shutdowns also may require scanning of the store
files to determine unused records - the
Config.REBUILD_IDGENERATORS_FAST parameter. So, the 35 bit address
space is an upper limit. Normally this number of lost records is
minuscule and easily recoverable so not a big deal.

The 36 bit address space for properties is a low limit - the id reuse
issue is practically non-existent for properties and since 1.5 there
is no 1-1 correspondence between property id and property entry (the
smallest ratio is 1:4). It all depends on the type of property - if it
classifies as a short string or short array and how big
(http://docs.neo4j.org/chunked/milestone/short-strings.html).

So you could have a db with around 34 billion nodes with one OUTGOING
relationship per node (so up to two per node, one INCOMING and one
OUTGOING, since every relationship connects two nodes) and at least 68
billion properties, with a max of 68*4=272 billion properties.

That's a lot of stuff! For reference, the smallest of those files will
be the node store with a size of (9 bytes/record * 2^35 records)/(2^30
bytes/gigabyte)  = 288 gigabytes. So you will start hitting machine
restrictions before you run out of id space.

cheers,
CG

On Thu, Nov 24, 2011 at 2:55 PM, bm3780 bm3...@gmail.com wrote:
 I've read that Neo4j has data capacity limitations
 (http://docs.neo4j.org/chunked/milestone/capabilities-capacity.html).  I
 would like to confirm my understandings that the node, properties, and
 relationships limitations are for each type (e.g. AND condition), not an
 either/or  (e.g. OR condition).

 Neo4j can hold:
   * ~34 billions nodes, AND
   * ~34 billion relationships, AND
   * ~68 billion properties

 So I could theoretically have a single graph with 34 billion nodes, where
 each node had two properties and a single relationship.

 --
 View this message in context: 
 http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Data-Capacities-tp3533552p3533552.html
 Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Data Capacities

2011-11-24 Thread Michael Hunger
If your data exceeds those amounts, then polyglot persistence is probably the 
way to go.

Is the other part of your data also interconnected and rich or is it just the 
social part?

All that not only depends on the storage but also a lot on the use-cases and 
scenarions how you are going to use that data in the future.

What kinds of apps, services, user(-requests) you have to server.

If you need any support for a PoC don't hesitate to contact us.

Cheers,

Michael
Am 24.11.2011 um 14:13 schrieb bm3780:

 I'm struggling to determine whether graph is a good fit for my domain.  Most
 of my application is structured data.  However, there are some parts that
 are of a social nature and a graph seems like a good match.  I guess my fear
 is having all of the data in a single store, such as a graph, would cause
 problems down the road due to the limitations.
 
 Potentially I need to go down the path of polyglot persistence...storing
 just the social aspect of my data in the graph and storing the other data in
 a document store.  I was try trying to simply our architecture by using only
 a graph, which would make OM much easier down the road.
 
 --
 View this message in context: 
 http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Data-Capacities-tp3533552p3533597.html
 Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Data Capacities

2011-11-24 Thread bm3780
All of my data is interconnected and rich.  This is why I like the idea of a
graph.

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Data-Capacities-tp3533552p3533673.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Data Capacities

2011-11-24 Thread Pekka Honkonen
No, we don't got that store, but we are developing new type of fraud
detection solution to CC vendor. We have one asset what they are looking,
but we like to add that real time correlation identify to solution. If we
manage to get deal, then that solution will process that amount of
transactions. We got numbers from CC company.
-Pekka

On Thu, Nov 24, 2011 at 3:54 PM, Michael Hunger 
michael.hun...@neotechnology.com wrote:

 Sounds great, so do you already reach those numbers?

 How do you store your data today?

 Michael

 Am 24.11.2011 um 14:53 schrieb bm3780:

  All of my data is interconnected and rich.  This is why I like the idea
 of a
  graph.
 
  --
  View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Data-Capacities-tp3533552p3533673.html
  Sent from the Neo4j Community Discussions mailing list archive at
 Nabble.com.
  ___
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user

 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Data Capacities

2011-11-24 Thread Jim Webber
Hi Pekka,

There are already (prominent) folks using Neo4j in that kind of credit card 
fraud detection. I hope some of them could volunteer their experiences (though 
not necessarily their proprietary clever stuff) on this list.

Jim
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Data Capacities

2011-11-24 Thread Pekka Honkonen
Great, as you see. We are small startup   www.epygg.com and one major CC
company has contact us, because we have one method what is really wanted by
them, i dont want to just give license for then, so i like to build some
solution top of my technology. Key is that we can generate one field of
data, what need to combine all traditional credit card payment data, in
find correltation between those.

Pekka




On Thu, Nov 24, 2011 at 4:05 PM, Jim Webber j...@neotechnology.com wrote:

 Hi Pekka,

 There are already (prominent) folks using Neo4j in that kind of credit
 card fraud detection. I hope some of them could volunteer their experiences
 (though not necessarily their proprietary clever stuff) on this list.

 Jim
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Data Capacities

2011-11-24 Thread bm3780
Ok, that previous answer was not representing my particular question thread. 
My application is a new initiative, so there is no existing data store. 
However, we do intent on ingesting other data sets to make our data more
interesting by our users.  Some of these data sets we are interested in is
on the order of billions of nodes if we were to actually ingest them, so
that is why we are trying to brainstorm on possible solutions.  Our initial
initiative, however, is to only store our own native data, which is as I
said before very structured, however has some social aspects and the
structured data itself is very interconnected to itself and other parts of
structured data.

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Data-Capacities-tp3533552p3533729.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo4j Python Index Iteration

2011-11-24 Thread Jacob Hansson
Hey Chris,

I'm happy to inform you that this is already the case :)

If you loop through the entire result, it automatically gets closed.

/jake

On Wed, Nov 23, 2011 at 8:42 PM, Chris Diehl cpdi...@gmail.com wrote:

 Hi Jake,

 As you know, with the current Neo4j Python bindings, one needs to close
 the index results after doing a lookup and iterating through the results.

 hits = idx['akey']['avalue']
  for item in hits:
  pass

 # Always close index results when you are
  # done, to free up resources.
  hits.close()

  Would it be possible to return an object that automatically closes hits
 after iteration is complete? I'd love to encapsulate the index in a class
 that takes care of the close for me so I don't have to worry about
 inserting that somewhere later in my code. Not exactly sure how to pull
 that off...

  Chris




-- 
Jacob Hansson
Phone: +46 (0) 763503395
Twitter: @jakewins
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] allSimplePaths performance

2011-11-24 Thread Petar Dobrev
Hi guys,

I played around some more with alternative approach and it turns out the
results are not equivalent.

Since I cannot test it with the desirable max depth of 8 on my setup, I ran
a test with max depth of 4.

For a given test case, allSimplePaths returned 2 paths of length 2 and 3:
(2624016)--[User_relation_6,9067449]--(2161113)--[PERSON_PERSON,7879807]--(2161112)
(2624016)--[User_relation_6,9067448]--(142023)--[PERSON_ORG,1982010]--(2161113)--[PERSON_PERSON,7879807]--(2161112)

The alternative approach found only the first one.
(2624016)--[User_relation_6,9067449]--(2161113)--[PERSON_PERSON,7879807]--(2161112)


Interestingly, if I add another relationship to the source node, which does
not change the number of paths between the two nodes, the pathsWithLength
approach finds also the second one.

Am I doing something wrong or is it that pathsWithLength will not always
return all paths with that length due to some greedy approach?

The documentation for ShortestPath states that the algorithm will try to
find a path:
@param findPathsOnMaxDepthOnly if {@code true} then it will only try
to find paths on that particular depth ({@code maxDepth}).
Does that mean that it can also fail to find a path on the particular depth?


The source of the testing program is here: https://gist.github.com/1391654
Output before adding the additional relationship:
https://gist.github.com/1391668
Output after adding the additional relationship:
https://gist.github.com/1391661

Neo4j version: 1.5


Thanks!

Best regards,
Petar





On Thu, Nov 24, 2011 at 12:57 PM, Peter Neubauer 
peter.neuba...@neotechnology.com wrote:

 Petar,
 very cool if this worked out. Maybe you could write up a testcase that
 verifies that the results are the same, and then put this as a fork to
 the graphalgo package? Sounds like a great addition if this works out?

 Cheers,

 /peter neubauer

 GTalk:  neubauer.peter
 Skype   peter.neubauer
 Phone   +46 704 106975
 LinkedIn   http://www.linkedin.com/in/neubauer
 Twitter  http://twitter.com/peterneubauer

 http://www.neo4j.org  - NOSQL for the Enterprise.
 http://startupbootcamp.org/- Öresund - Innovation happens HERE.



 On Thu, Nov 24, 2011 at 11:42 AM, Petar Dobrev peter.dob...@gmail.com
 wrote:
  Hi guys,
 
  I have a graph of about 2.5M nodes and 8M relationships and I am trying
 to
  find all simple paths between two nodes with maximum depth of 8.
 
  The allSimplePaths graph algo works well for maximum depth of 5, but for
 8
  it runs really long (I didn't even wait for it to finish). So I thought
  it's just that the graph is too complicated and the search operation is
  very expensive.
 
  On the other hand I noticed that shortestPath and pathsWithLength both
 work
  fast. So I tried this experiment:
 
- Run shortestPath and record the shortest length
- Iterate from the shortest length to max_depth
   - Run pathsWithLength and append the results
   -
 
  And it turns out to be working really well.. much, much faster than the
  allSimplePaths solution, which I found quite baffling, since the latter
  solution should be doing more work to accomplish the same task.
 
  Maybe it's just with my graph, but it's still weird.
 
  Best regards,
  Petar
  ___
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user
 
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Petar Dobrev
Engineer
Philanthropedia
http://www.myphilanthropedia.org
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] allSimplePaths performance

2011-11-24 Thread Mattias Persson
There are several optimizations that the shortest path algo does that
allSimplePaths doesn't, f.ex:

* Traversal is bidirectional (it starts from the start AND the end
simultaneously, although in the same thread) which means that the deeper
the traversal goes the more it gains compared to a single directional
traversal
* It stops on the depth it finds the first hit on

Shortest path algo is implemented from scratch to be optimized for just
that, but allSimplePaths uses traversal framework which doesn't support
bidirectional traversals yet, although there have been some experiments
with that too so perhaps soon!

2011/11/24 Peter Neubauer peter.neuba...@neotechnology.com

 Petar,
 very cool if this worked out. Maybe you could write up a testcase that
 verifies that the results are the same, and then put this as a fork to
 the graphalgo package? Sounds like a great addition if this works out?

 Cheers,

 /peter neubauer

 GTalk:  neubauer.peter
 Skype   peter.neubauer
 Phone   +46 704 106975
 LinkedIn   http://www.linkedin.com/in/neubauer
 Twitter  http://twitter.com/peterneubauer

 http://www.neo4j.org  - NOSQL for the Enterprise.
 http://startupbootcamp.org/- Öresund - Innovation happens HERE.



 On Thu, Nov 24, 2011 at 11:42 AM, Petar Dobrev peter.dob...@gmail.com
 wrote:
  Hi guys,
 
  I have a graph of about 2.5M nodes and 8M relationships and I am trying
 to
  find all simple paths between two nodes with maximum depth of 8.
 
  The allSimplePaths graph algo works well for maximum depth of 5, but for
 8
  it runs really long (I didn't even wait for it to finish). So I thought
  it's just that the graph is too complicated and the search operation is
  very expensive.
 
  On the other hand I noticed that shortestPath and pathsWithLength both
 work
  fast. So I tried this experiment:
 
- Run shortestPath and record the shortest length
- Iterate from the shortest length to max_depth
   - Run pathsWithLength and append the results
   -
 
  And it turns out to be working really well.. much, much faster than the
  allSimplePaths solution, which I found quite baffling, since the latter
  solution should be doing more work to accomplish the same task.
 
  Maybe it's just with my graph, but it's still weird.
 
  Best regards,
  Petar
  ___
  Neo4j mailing list
  User@lists.neo4j.org
  https://lists.neo4j.org/mailman/listinfo/user
 
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user




-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] [Cypher] ANY() and array properties

2011-11-24 Thread Stephen
Is ANY() supposed to work with array properties? e.g. I have the following
WHERE clause in my query:

WHERE pa.position AND ANY(pos in pa.positions : pos = QB)

However, I get a syntax error Probably missing quotes around a string
pointed at the = sign.

I can verify that pa.positions is an array by returning it directly.

-Stephen

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Cypher-ANY-and-array-properties-tp3535052p3535052.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] [Cypher] ANY() and array properties

2011-11-24 Thread Andres Taylor
On Fri, Nov 25, 2011 at 1:40 AM, Stephen glur...@gmail.com wrote:

 Is ANY() supposed to work with array properties? e.g. I have the following
 WHERE clause in my query:


It is supposed to, but it doesn't yet.

Sorry about that...

Andrés
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user