[Neo4j] Gremlin steps in JavaDoc.

2011-12-09 Thread Marko Rodriguez
Hi, For those using Gremlin and wanting a complete list of all provided steps and their various overloadings, please see: http://tinkerpop.com/maven2/com/tinkerpop/gremlin/gremlin-java/1.4/api/com/tinkerpop/gremlin/java/GremlinPipeline.html Note that this is for Gremlin 1.4 (released

Re: [Neo4j] Neo4jClient - Query optmised

2011-12-08 Thread Marko Rodriguez
Nice! BTW: Great work on the Neo4j .Net Client. Marko. http://markorodriguez.com On Dec 7, 2011, at 9:14 PM, Romiko Derbynew wrote: Finally thanks to Peter and Marko, the .Net Neo4jClient code has been optimised to use short hand version of in('') and out(''). ChangeSet is

[Neo4j] TinkerPop Stack Release

2011-12-08 Thread Marko Rodriguez
Hello, Yesterday TinkerPop did another stable release. This release depends on Neo4j 1.5. Here are the notes for those that are interested: New homepage design: http://tinkerpop.com Blueprints 1.1 (Blueberry):

Re: [Neo4j] println and Table Projections

2011-12-07 Thread Marko Rodriguez
Hi, Peter brings up a good point. Its hard for us to parse complex queries and see where Exceptions are happening. If you can isolate the problem via a simpler traversal, that would be best for us -- and our little baby brains. Also, note the following syntax optimizations for your traversal:

Re: [Neo4j] [Neo4j-User] Re: Gremlin Query - Help

2011-12-06 Thread Marko Rodriguez
...@lists.neo4j.org] On Behalf Of Marko Rodriguez Sent: Saturday, 3 December 2011 4:10 AM To: Neo4j user discussions Subject: Re: [Neo4j] Gremlin Query - Help Hi, Scenario 1: I would like to get all Nodes that do not have a relationship to another node. What is the best way to do this Gremlin? Root

Re: [Neo4j] Aggregates inside copySplit()

2011-12-05 Thread Marko Rodriguez
Hi, I had to use Aggregate here, instead of Store(), else the Except does not work. The except() does work, but you have you understand how it works with respects to the semantics of aggregate() and store(). store = lazily store objects in the pipeline to some collection x

Re: [Neo4j] Anyone try out the PageRank function on Gremlin?

2011-12-05 Thread Marko Rodriguez
Hi, Anyone try out the PageRank function on Gremlin? https://github.com/tinkerpop/gremlin/wiki/Working-with-JUNG-Algorithms/0506c193f30abe0bc18d40d7a08c9257d9311b13 How does it perform with just under 100k nodes on a sparse graph (3000 relationship max, average of 100)? I've been doing

Re: [Neo4j] Aggregates inside copySplit()

2011-12-05 Thread Marko Rodriguez
Hi Romiko, I am interested to learn more about the inner workings of Gremlin? I would too! :P This might help you out: http://markorodriguez.com/2011/08/03/on-the-nature-of-pipes/ Marko. http://markorodriguez.com ___ Neo4j mailing list

Re: [Neo4j] Unique constraint and transaction over REST

2011-12-05 Thread Marko Rodriguez
Hey, Matt: This isn't related to this thread, but I noticed you are from Scholar.ly. I thought you might like this: http://arxiv.org/abs/0905.1594 Go Canucks!, Marko. http://markorodriguez.com On Dec 4, 2011, at 12:58 AM, Matt Luongo wrote: Well, I had already started writing this

Re: [Neo4j] [Neo4j-User] Re: Unique constraint and transaction over REST

2011-12-05 Thread Marko Rodriguez
We have an alpha release coming up- would you be interested in seeing what we have? Oh would I! Golly gee. :P, Marko. http://markorodriguez.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user

Re: [Neo4j] Gremlin/Groovy UNIQUE + Closure support

2011-12-03 Thread Marko Rodriguez
Hi, unique() is a Groovy construct, not a Gremlin construct. The Gremlin equivalent is uniqueObject(). And, in Gremlin 1.4, being released next week, its called dedup(). Gremlin constructs Pipelines in the backend (toString() an expression). If you drop out of pipeline construction by moving

Re: [Neo4j] Gremlin/Groovy UNIQUE + Closure support

2011-12-03 Thread Marko Rodriguez
Hi, uniqueObject is in Gremlin 1.3 and below. The online docs are for Gremlin 1.4 and uniqueObject is now called dedup. To see the Gremlin 1.3 documentation, see the wiki/ directory of the distribution. HTH, Marko. http://markorodriguez.com On Dec 3, 2011 4:13 PM, Romiko Derbynew

Re: [Neo4j] Gremlin Query - Help

2011-12-02 Thread Marko Rodriguez
Hi, Scenario 1: I would like to get all Nodes that do not have a relationship to another node. What is the best way to do this Gremlin? Root = NodeA = NodeB Root = NodeC Output should be NodeC I don't understand the problem. Scenario 2: Root = User - Centre I would like

Re: [Neo4j] New Bug Logged - Gremlin 114

2011-11-30 Thread Marko Rodriguez
Hi, Please put this into the Gremlin issue tracker. https://github.com/tinkerpop/gremlin/issues The table is not intended to be ordered with the location of the named as steps. It was just not engineered that way. However, others have brought this up. I suspect for Gremlin 1.5

Re: [Neo4j] New Bug Logged - Gremlin 114

2011-11-30 Thread Marko Rodriguez
Hi, Actually, I know how to solve your problem. See below. g.v(0).outE[[label:'HOSTS']].inV.filter{ it.Key == 'romikoagency' }.inE[[label:'USER_BELONGS_TO']].outV.filter{ it.Username == 'romiko.derbynew'

Re: [Neo4j] Securing scripting in the server

2011-11-28 Thread Marko Rodriguez
Hi Peter, Now, the question is if any of you has some experience tweaking the Java Security Manager to remove System.exit, File write permissions and other bad stuff from that code. Would love to see some examples of real-life securing JSR232 script engines. Or are there other mechanisms that

Re: [Neo4j] Exporting Neo4j subgraphs to graphml/gexf....

2011-11-21 Thread Marko Rodriguez
Hi, I added this to the StackOverflow discussion: http://stackoverflow.com/questions/2204440/convert-neo4j-db-to-xml/8214750#8214750 HTH, Marko. http://markorodriguez.com On Nov 21, 2011, at 4:54 AM, Pablo Pareja wrote: Hi, I was wondering whether there's (or are any plans to

Re: [Neo4j] Gremlin Script broken in 1.5 GA

2011-11-19 Thread Marko Rodriguez
Hi, With Gremlin 1.3, filter{} is required. No shorthands. Thus, outE{} needs to be outE.filter{}. Moreover, you can now do out(label) or outE(label). HTH, Marko. http://markorodriguez.com On Nov 19, 2011 10:25 AM, Haensel thehaen...@gmail.com wrote: Don't know if this is a bug or a feature,

Re: [Neo4j] Max flow using gremlin

2011-11-18 Thread Marko Rodriguez
Hi, has anyone implemented any of the max flow algorithms using gremlin? Most of the algorithms in my toolbox are flow-based algorithms. What in particular are you trying to do? Marko. http://markorodriguez.com ___ Neo4j mailing list

Re: [Neo4j] Max flow using gremlin

2011-11-18 Thread Marko Rodriguez
and get the nodes in the path . Alfredas On Fri, Nov 18, 2011 at 2:48 PM, Marko Rodriguez okramma...@gmail.com wrote: Hi, has anyone implemented any of the max flow algorithms using gremlin? Most of the algorithms in my toolbox are flow-based algorithms. What in particular are you

Re: [Neo4j] Max flow using gremlin

2011-11-18 Thread Marko Rodriguez
This seems to calculate the max flow (edges have capacity): source.outE.inV.loop(2){!it.object.equals(sink)}.paths.each{flow = it.capacity.min(); maxFlow += flow; it.findAll{it.capacity}.each{it.capacity -= flow}}; I can't believe this is so short! Thats the beauty of Gremlin. Once you

Re: [Neo4j] Neo4j-Scala Wrapper 0.1.0 released

2011-11-17 Thread Marko Rodriguez
Hey, It might be a little too soon to bring it up, but early December, we are releasing Gremlin Scala in Gremlin 1.4 which will allow you to import Gremlin into your Scala project (e.g. Neo4j-Scala Wrapper) and evaluate Gremlin queries natively.

Re: [Neo4j] Gremlin plugin and script engine question

2011-11-17 Thread Marko Rodriguez
Hey Alfredas, Be sure to iterate your pipeline x = []; g.v(1).out(from).out(to).aggregate(x).loop(3){it.loops 4}.iterate(); x * NOTE: You can also do: g.v(1).out(from).out(to).aggregate(x).loop(3){it.loops 4} -1 but the convention is no longer with us in Gremlin

Re: [Neo4j] Gremlin plugin and script engine question

2011-11-17 Thread Marko Rodriguez
like a Gremlin expression returns results. Hope that is clear, Marko. http://markorodriguez.com A On Thu, Nov 17, 2011 at 4:07 PM, Marko Rodriguez okramma...@gmail.com wrote: Hey Alfredas, Be sure to iterate your pipeline x = []; g.v(1).out(from).out(to).aggregate(x).loop(3

Re: [Neo4j] why g.V[6].both is not returning any thing

2011-11-16 Thread Marko Rodriguez
Hi, ...or it means that g.V[6] isn't connected to anything. Do this: v = g.V[6].next() v.both v.map() That will tell you if the 6th vertex of V is connected and if it has properties. Marko. http://markorodriguez.com On Nov 16, 2011, at 4:28 AM, Peter Neubauer wrote: Rahul, this probably

Re: [Neo4j] Simple paging question - Gremlin

2011-11-14 Thread Marko Rodriguez
Hey Kevin, g.v(293).in.drop(5).take(5) and g.v(293).in[5..9] (Both return the same, correct result set) I will be doing some performance tests today on the two, but last week when I tried them both on fairly heavy queries, the second method seemed faster (I only say seemed, because

Re: [Neo4j] Neo4J for semantic graphs + algorithms

2011-11-14 Thread Marko Rodriguez
Hello, Any information to load OWL specifications into Neo4J or guidance to design algorithms (managment of temporary data is the blocking point)? When you use the OpenRDF SAIL bindings provided by TinkerPop, you will be able to use OpenRDF's OWL reasoners and other tools. Basically, the

Re: [Neo4j] Gremlin - how to flatten a tree, and sort

2011-11-10 Thread Marko Rodriguez
Hi, I've been trying that query out (slightly modified now to return all nodes of a different kind, but attached to a node in the first set), on a data set of around 100K, and I'm getting an OutOfMemoryError: { message : GC overhead limit exceeded, exception : java.lang.OutOfMemoryError:

Re: [Neo4j] Wrong Gremlin results through REST interface

2011-11-08 Thread Marko Rodriguez
Hey, To expand on Peter's point. I suspect people are mixing versions of Gremlin. Gremlin is generally (not usually) backwards compatible from version to version. If you are using Gremlin REPL, GremlinPlugin, and Gremlin from Neo4j WebAdmin, its good to make sure you have the same version of

Re: [Neo4j] Ontology in Neo4J REST db

2011-11-08 Thread Marko Rodriguez
Hi, Anybody knows how to use OWLAPI or any API that can parse and handle these information of a class definition and store them into the Neo4J db? I am not familiar with OWLAPI, but for RDF/RDFS/OWL work, I use GraphSail over Neo4j.

Re: [Neo4j] Gremlin - how to flatten a tree, and sort

2011-11-07 Thread Marko Rodriguez
Hey, I've played around a bit more, and this is the query that currently works best for me... would anyone mind reviewing it for me please? Feels a little like I'm getting the right answer, but the wrong way gremlin m = [:]; gremlin g.v(162).in('R_PartOf').loop(1){m.put(it.object,

Re: [Neo4j] Gremlig Plugin - Paramerterised Queries + Enumeration - Neo4j 1.5M02

2011-11-07 Thread Marko Rodriguez
Hey, I can confirm that the gremlin query works in the Console but not in the REST API. Console Working: gremlin g.v(0).outE[[label:'HOSTS']].inV{ it['UniqueId'] == 11761 }.drop(0).take(100)._() == v[756] I will log a bug issue on this:

Re: [Neo4j] Gremlin - how to flatten a tree, and sort

2011-11-04 Thread Marko Rodriguez
Hi, I would do it like this: m = [:] g.v(162).in('R_PartOf').loop(1){m.put(it.object, it.loops); true} -1 m.sort{a, b - a.value = b.value}.keySet as List In short, fill up a Map (m) with key being the vertex and value being the number of hops (or times through the loop). Then sort the map by

Re: [Neo4j] Gremlin - how to flatten a tree, and sort

2011-11-04 Thread Marko Rodriguez
- Innovation happens HERE. On Fri, Nov 4, 2011 at 11:12 AM, Marko Rodriguez okramma...@gmail.com wrote: Hi, I would do it like this: m = [:] g.v(162).in('R_PartOf').loop(1){m.put(it.object, it.loops); true} -1 m.sort{a, b - a.value = b.value}.keySet as List In short, fill up a Map (m

Re: [Neo4j] Gremlin - how to flatten a tree, and sort

2011-11-04 Thread Marko Rodriguez
Hi, Thanks! I will still need to try this out, but the idea (in your first response) kind of feels more or less like what I knew I needed. I have so many questions now based on the responses so far - it feels like I'm just scratching the surface! Once you get it, you can get nasty with

Re: [Neo4j] some questions

2011-10-28 Thread Marko Rodriguez
Hi, 2. Assume I have a big graph in the REST server, what is the best way to remove the whole graph? Of course deleting each node and its relationships and its index is not convenient. Via Gremlin Plugin, you can call g.clear(). HTH, Marko. http://markorodriguez.com

Re: [Neo4j] Gremlin help

2011-10-25 Thread Marko Rodriguez
simple method that I can make use that I'm not aware of). Thanks very much again. On Sat, Oct 22, 2011 at 9:40 AM, Marko Rodriguez okramma...@gmail.comwrote: Hi, Currently I'm doing the following in my own code with multiple requests to the standalone neo4j server. I wonder if it's

Re: [Neo4j] Gremlin help

2011-10-22 Thread Marko Rodriguez
Hi, Currently I'm doing the following in my own code with multiple requests to the standalone neo4j server. I wonder if it's possible to achieve in one gremlin query/script so that I can post the gremlin query to the server as 1 request and done. What I'm trying to achieve is: Start

Re: [Neo4j] Neo4j, Gremlin and Campaign data

2011-10-18 Thread Marko Rodriguez
Digging it up was the easy part :D. Writing it was the hard part. This is the fellow who wrote it: http://twitter.com/#!/davefauth Marko. http://markorodriguez.com On Oct 18, 2011, at 7:33 AM, Peter Neubauer wrote: Hi all, the other day Marko dug this up - using Neo4j with Campaign

Re: [Neo4j] Article: The Coming SQL Collapse

2011-10-14 Thread Marko Rodriguez
Hello, The type system provided by Spring Data Neo4j has a nearly identical semantics to Java (and most object oriented languages). The type system employed by FreeBase is more aligned with description logics --- RDFS/OWL. For many who live in the world of object oriented programming, being

Re: [Neo4j] Article: The Coming SQL Collapse

2011-10-14 Thread Marko Rodriguez
Hi, This is not conducive to Baysian-based reasoning, evidential reasoning, other forms of logics (classical and non-classical) How would you model those to a suitable domain model? Can you give a good example? Michael Here is an article that argues for support of other data

Re: [Neo4j] Mahout, and Migrating from JPA/Hibernate/MySQL to Neo4j?

2011-10-12 Thread Marko Rodriguez
Hi Deejay, 1. We're using Mahout as a recommendation system. Has anyone had any success plugging Neo4j into this? I work with various companies using graph databases to do recommendation. Moreover, a couple of them are also experimenting with Mahout over MySQL and Hadoop. I have never

Re: [Neo4j] Neo4J + ThingWorx Presentation from QCon...

2011-10-11 Thread Marko Rodriguez
I thoroughly enjoyed the presentation. Well done. Marko. http://markorodriguez.com On Oct 11, 2011, at 2:01 PM, Rick Bullotta wrote: ...is now online. http://www.infoq.com/presentations/Graph-Database-Power-Web-of-Things Enjoy. ___ Neo4j

Re: [Neo4j] Gremlin syntax for multiple paths in one call

2011-10-04 Thread Marko Rodriguez
Hey, If I want to get the following g.V(0).out('Friends') and g.V(0).in('Likes') This is the world of split and merge. The syntax for this is not the sexiest, but as it stands: g.v(0)._.copySplit(_().out('Friends'), _().in('Likes')).fairMerge copySplit will take what

Re: [Neo4j] Gremlin syntax for multiple paths in one call

2011-10-04 Thread Marko Rodriguez
Hey, Your answer is correct too, though its not lazy. However, I suspect its more understandable. Marko. On Oct 4, 2011 8:31 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Nice one, will change the docs. /peter Sent from my phone. On Oct 4, 2011 5:20 PM, Marko Rodriguez okramma

Re: [Neo4j] C# REST binding / wrapper

2011-10-03 Thread Marko Rodriguez
Hey Romiko, http://romikoderbynew.com/2011/07/30/neo4jclient-primer/ That is really cool how you build a Gremlin expression in C# using a fluent pattern and then, I suspect, transform it to the appropriate Gremlin string representation for transport over the wire to Neo4j REST Server. Is that

Re: [Neo4j] Some questions about design when using neo4j

2011-09-28 Thread Marko Rodriguez
Hey, If you want to play with JUNG over Neo4j, you can do it via TinkerPop. Graph g = new Neo4jGraph(/tmp/neo4j); GraphJung jung = new GraphJung(g); That GraphJung object is a implementation of the JUNG Interfaces and can be processed by the JUNG algorithms package.

Re: [Neo4j] Neo4J Rest server support SPARQL??

2011-09-28 Thread Marko Rodriguez
Hey, After adding nodes and relationships into Neo4J REST server using REST API. How do I read data from the database using SPARQL? Does the database support SPARQL? Neo4j is not an RDF database in its raw form. Its data model is a bit more complicated than RDF and as such, is not amenable

Re: [Neo4j] how to get the User who has been B Followed who has Followed Back.

2011-09-20 Thread Marko Rodriguez
Hi, I have some relation like this: http://neo4j-community-discussions.438527.n3.nabble.com/file/n3352328/follow.jpg what should I do to get the users who has been B Followed and has Followed back to B. In the image the result should be (A). In Gremlin

Re: [Neo4j] Neo4j low-level data storage

2011-09-14 Thread Marko Rodriguez
shameless plug explanation=my blog There is no shame in producing good work and sharing it with others. Marko. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user

Re: [Neo4j] Gremlin Sort Syntax Help

2011-09-12 Thread Marko Rodriguez
Hey, Using the REST API g.v(0).out.unique().sort{it.Name}.toList() Cool. works but i can't get t = new Table(); g.v(0).out.as('friend').table(t).sort{it.Name} -1; t; to sort correctly. Table will simply pass the object through itself (it is a side-effect step). Thus, you

[Neo4j] A Note on Writing Performant Gremlin

2011-09-12 Thread Marko Rodriguez
Hi Gremlin+Neo4j+OrientDB people, I apologize for the cross list posting, but this is an important piece of information for those using Gremlin with their respective graph databases. I've noticed lots of people use the very friendly notation of Element.key to get the property value of an

Re: [Neo4j] A Note on Writing Performant Gremlin

2011-09-12 Thread Marko Rodriguez
Hey, just to be clear, Would it be safe to say that the compile time for g.v(0).out.out -1 would be slower than g.v(0).out().out() -1 and slower than g.v(0).outE().inV().outE().inV() -1 The fastest would be g.v(0).out().out(). It is also surprising that the compile

Re: [Neo4j] Returning arbitrary data from gremlin

2011-09-11 Thread Marko Rodriguez
Hi, Also, there table-step documentation for Gremlin is in Pattern Match Pattern: https://github.com/tinkerpop/gremlin/wiki/Pattern-Match-Pattern Side note: t = t.collect { outN = it.outV.toList().get(0); inN = it.inV.toList().get(0); [outN.type, outN.key, inN.type,

Re: [Neo4j] Aggregate queries

2011-09-10 Thread Marko Rodriguez
Hey, m = [:]; g.idx(user).get(key, %query%*)._()[0..5].sideEffect { x = it.key }.out.in.uniqueObject.loop(3) { it.loops 2 }.sideEffect { if (!m[x]) { m[x] = 0; }; m[x]++ } -1; m; Tips: 1. do g.idx(user).get(key, %query%*)[0..5] - _() is not needed. 2.

Re: [Neo4j] chain TraversalDescription?

2011-09-09 Thread Marko Rodriguez
Hi, I would do this using Gremlin as such: g.v(1).out('read').in('wrote').uniqueObject.out('pet').name If you are vertex 1 (g.v(1)), then you will go to the books you read, then to the authors of those books, then because you might have read two Stephen King

Re: [Neo4j] Gremlin pipes broken in 1.5

2011-09-09 Thread Marko Rodriguez
Hi, This error seems to be an issue with depedencies. Are you using an TinkerPop dependency/s in your project. I believe Neo4j 1.5.M01 is depending on Blueprints 0.9 which does have the getInEdges(String...) method (similarly for getOutEdges(). Perhaps you are depending on Blueprints 0.8

Re: [Neo4j] Aggregate queries

2011-09-08 Thread Marko Rodriguez
Hi, Thanks James. Here is how I would do it -- groupCount is not needed. g.idx(index_name)[[key:value]].both.loop(1){it.loops depth}.count() Note: Be wary of this query. Make sure the branch factor of your graph is sufficiently small or the depth to which you are exploring is

Re: [Neo4j] Aggregate queries

2011-09-08 Thread Marko Rodriguez
Hey, Won't this count dupes more than once? Xavier's requirements of how many other nodes are they connected sounds like you should only count uniques, and that's why I am checking the size of groupCount map instead of using count(). Instead of a map you could use a Set with aggregate(),

Re: [Neo4j] Spring Data Neo4J vs. Tinker Pop's Frames/BluePrints?

2011-09-02 Thread Marko Rodriguez
Hi, My thoughts on the matter. Frames is bare-bones simple and the library is tiny. If you simply want to do the following, then Frames is cool: 1. Use annotated interfaces to define a Graph-to-Object mapping. (at the cost of Java reflection) 2. Use your objects as a way to

Re: [Neo4j] 10 questions

2011-09-02 Thread Marko Rodriguez
Oh, I didn't see this: (use twitter example: my followees' followers) Then the query I provided in the previous email: g.v(1).out('livesIn').sideEffect{city = it}.back(2).out.out.filter{it.out('livesIn').next().equals(city)}.groupCount(age){it.age}.groupCount(gender){it.gender}

Re: [Neo4j] Hyperedges in Neo4j

2011-09-01 Thread Marko Rodriguez
Hey, I think a traversal should in principal be performed with a query language that is not turing complete so we can guarantee termination. Turning completeness is not the lower bound for non-guaranteed termination. You can't guarantee completion in a regular language when your String (data

Re: [Neo4j] problem in SPARQL querying

2011-09-01 Thread Marko Rodriguez
Hey, Even on closing the manager, I did not see any change.. any further ideas?? Thanks! The best thing to do is not dive straight into a complex SPARQL query, but look to see if the particular triples you think are lost are actually there. You can do this with simple SPARQL queries or drop

[Neo4j] FluentPipeline with Pipes

2011-09-01 Thread Marko Rodriguez
Hi everyone, For those on the Gremlin-users mailing list, this is not new. However, for others, I thought you would like to see some work over at TinkerPop that I'm really diggin'. In Pipes 0.8-SNAPSHOT, we have made it so that its much easier to construct Gremlin-esque traversals in native

Re: [Neo4j] problem in SPARQL querying

2011-08-31 Thread Marko Rodriguez
Hi Shri, Question: Why do you have a TransactionalGraphManager as, in your code, you are not writing anything to disk? This makes me believe that you have another snippet of code that is writing data to the graph. Are you sure all your data is in the graph? -- How did you construct dataset

Re: [Neo4j] problem in SPARQL querying

2011-08-31 Thread Marko Rodriguez
Hi, Where are you defining your RDFHandler (TripleHandler). Can I see that class please? Thanks, Marko. http://markorodriguez.com On Aug 31, 2011, at 7:25 AM, shri wrote: Hi Marko, Yes I have another separate file for loading the data( .NT format). Let me know if I should tell anything

Re: [Neo4j] problem in SPARQL querying

2011-08-31 Thread Marko Rodriguez
Hi, When you are done with the file, you should close your manager. I believe should do the trick: public void endRDF() throws RDFHandlerException { manager.close(); } // NOTE: I don't know the specifics of RDFHandler, but it sounds like endRDF() is the method

Re: [Neo4j] Update/Move relationships through REST APIs

2011-08-31 Thread Marko Rodriguez
where their starting node is, I want them to set the end node to node B. Node C --:foo-- Node A Node D --:foo-- Node A Node E --:bar-- Node A would become: Node C --:foo-- Node B Node D --:foo - Node B Node E --:bar-- Node A On Wed, Aug 31, 2011 at 5:00 PM, Marko Rodriguez okramma

Re: [Neo4j] Update/Move relationships through REST APIs

2011-08-31 Thread Marko Rodriguez
you don't need to create this CommitManager object. Anywho. Thats that. See ya. On Aug 31, 2011, at 7:38 PM, Marko Rodriguez wrote: Hi, I did you example over TinkerGraph as vertex IDs are Strings and thus, easy to build your graph with. ~$ gremlin \,,,/ (o o) -oOOo

Re: [Neo4j] REST API: output respresentation and performance

2011-08-29 Thread Marko Rodriguez
Hi, - Data transfer bottleneck. Returning a large set of nodes/relationships from a Gremlin query with Json might result in excesive result size. We transfer from hundreds to 100.000 entities. In our case, we only need to obtain a single property value (or just a few properties) for each

Re: [Neo4j] RDF querying

2011-08-28 Thread Marko Rodriguez
Hello, Note that with loadFile(), you are not incrementing your commit manager's counter and thus, if your RDF file is large, you may run out of memory. See the work of Claudio for a good model for large RDF graphs: http://blog.acaro.org/entry/dbpedia4neo

Re: [Neo4j] A big graph for test

2011-08-08 Thread Marko Rodriguez
Hi, First, I analyze the statistics of my real-world graph data set. For example, determine the degree distribution -- if you want to get fancy, the degree distribution for each edge type/label. Then I plot that on a log/log-scale. Get the slope of that plot which gives me the alpha exponent.

Re: [Neo4j] possible to query spatial indexes from gremlin?

2011-08-08 Thread Marko Rodriguez
Hey, :). You can do: g.idx('test')[['bbox','[15.0, 16.0, 56.0, 61.0]']] See ya, Marko. http://markorodriguez.com On Aug 8, 2011, at 4:27 PM, Peter Neubauer wrote: Boris, I extended the functional tests to do what you are asking for,

[Neo4j] [Blog Post] Mario Brothers! ... and Gremlin/Pipes stuff.

2011-08-04 Thread Marko Rodriguez
Hi, Before leaving for a 2.5 week vacation, I thought it would be good to drop another blog post. This will be my last post before I buckle down on a paper for GDM'12 ( http://www.cse.unsw.edu.au/~iwgdm/2012/ ) or die an excruciatingly painful death on my vacation. In this post we learn about

Re: [Neo4j] Property graph model vs. classical approach

2011-08-04 Thread Marko Rodriguez
Hey Norbert, I'm wondering why Neo4j provides an API based on a property graph model and is not using the classical graph approach GV,E? What are the advantages of this architecture? Any thoughts? Is Neo4j internally really based upon a property graph? What are the disadvantages of a

Re: [Neo4j] RDF Store Research

2011-08-04 Thread Marko Rodriguez
Hey, I have some questions for our research of possible RDF Triple Stores with fast graph traversal and fast (fulltext) search. As of now we are using OpenRDFs Native and Memory Stores and OpenLink Virtuoso as our RDF Triple Store. How is the performance compared to OpenRDF Native and Memory

Re: [Neo4j] Property graph model vs. classical approach

2011-08-04 Thread Marko Rodriguez
Yo, I'm simply confronted with the question 'why do you use such a graph model and not another one based on graph classes'? Hence, I'm gathering pros and cons for the 'property graph' model. Why is an interface like the one of Neo4j provided this way and not in another (e.g. using graph

Re: [Neo4j] Collaborative filtering in Cypher

2011-08-01 Thread Marko Rodriguez
Hi, Hi, I'm new to graph databases and have been trying to understand the power of Cypher and/or Gremlin as a way to develop suggestion queries. I've watched a few webinars and read through some of the documentation but I've had a hard time figuring out complex suggestion type queries other

Re: [Neo4j] Brainstorming on my project: neo4john

2011-07-31 Thread Marko Rodriguez
Marko had a good line about this: graphs are adjacency free indexes (or words to that affect). :) -- Index-free Adjacency Marko. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user

Re: [Neo4j] Neo4J Gremlin Query for dates

2011-07-29 Thread Marko Rodriguez
Hi, I have dates in Neo4j stored as JSON Dates. e.g. DateCreated: /Date(1310360656147+)/ LastLogin: /Date(1311927251851+)/ I use the iterator and lambda way of query data e.g. g.v(0).outE[[label:'HOSTS']].inV{it.'Name'.compareTo('Agency1') == 0}.Name SIDENOTE:

Re: [Neo4j] Comparing properties among different nodes in Gremlin

2011-07-26 Thread Marko Rodriguez
Jump out from behind bushes/ Hey hey, Thank you again, Marko. Let's try with a query that I'm not able to build in Gremlin. Looking at the property graph, I need the final vertices of all the paths of length 3, with at least one property name equals to josh in some vertex except the first

Re: [Neo4j] Comparing properties among different nodes in Gremlin

2011-07-25 Thread Marko Rodriguez
Hi, I mean, I need to compare the value of a node property with the value in the last node property, and repeat the process on every node to check growth rates. But I don't if this is possible without using variables external to the query. I don't know if this is your paricular solution,

Re: [Neo4j] Comparing properties among different nodes in Gremlin

2011-07-25 Thread Marko Rodriguez
Hi, Does that help you? Can you map that motif over to your problem? Thank you, I hope so. Maybe the best way is to get all the properties map in each vertex in order to be able to operate with those values in the next vertex. Is that possible? In that case do: gremlin

Re: [Neo4j] Comparing properties among different nodes in Gremlin

2011-07-25 Thread Marko Rodriguez
Hi, Pipes++ looks interesting. I have to do more tests but I hope to find a way to acomplish my goal. I will give you any query you ask over the play dataset: https://github.com/tinkerpop/gremlin/wiki/Defining-a-Property-Graph Thus, if you say, Marko, tell me how to get all X, where

Re: [Neo4j] paging

2011-07-24 Thread Marko Rodriguez
Hi, For Cypher, there is SKIP and LIMIT, together acting as a kind of paging system, but executing the query again (just giving you a different chunk of the result), so I am not sure that works for your case. http://docs.neo4j.org/chunked/snapshot/cypher-query-lang.html. Gremlin supports

Re: [Neo4j] Gremlin performance?

2011-07-23 Thread Marko Rodriguez
Hey, Groovy is only used to compile a statement like g.v(1).out.in.blah to a Pipes which is native Java. As such, once the compilation is complete (milliseconds), it is simply native Java (This is not completely true as there are some Gremlin specific pipes). Next, for the relationship between

Re: [Neo4j] Gremlin performance?

2011-07-23 Thread Marko Rodriguez
://markorodriguez.com/2011/02/08/property-graph-algorithms/ Thanks, Marko. http://markorodriguez.com On Jul 23, 2011, at 9:16 AM, Marko Rodriguez wrote: Hey, Groovy is only used to compile a statement like g.v(1).out.in.blah to a Pipes which is native Java. As such, once the compilation is complete

Re: [Neo4j] Cypher request with where clause on relations count

2011-07-21 Thread Marko Rodriguez
Hey, Request is working like a charm and is fast (around 6 objects are checked in my 2M node 6M rel DB). I have to check the result with the corresponding RDBMS KPI. Nice. Thanks again ! No problem. I definitively have to take more time to learn Gremlin ! You are more than welcome

Re: [Neo4j] Cypher request with where clause on relations count

2011-07-20 Thread Marko Rodriguez
Hey guys, I have 2 kind of nodes (let's say A and B) which are related using a relation of type 'USES'. I want to count all the type A nodes which have only 1 relation to B type node and all the type A nodes which have more than one relation to B type node. I am using neo4j server and

Re: [Neo4j] retrieve all relationships of a certain type (java)

2011-07-20 Thread Marko Rodriguez
Hey, How would I go about retrieving all nodes for a certain relationship Type (ie. assuming I don't know any of them nodes) ? Use an index. I don't know in native Neo4j off the top of my head, but the analogous to this in Blueprints: g.getIndex(edges, Edge.class).get(label,myType)

Re: [Neo4j] Cypher request with where clause on relations count

2011-07-20 Thread Marko Rodriguez
Hey, @Marko thanks. I just tried to do it with Gremlin but I have not your knowledge of gremlin. I will try to do that. If you use Neo4j Server 1.4, then you will be in Gremlin 1.1 land. I don't know what you are rolling with (embedded, server, etc.), but if you want the query in Gremlin

Re: [Neo4j] Cypher request with where clause on relations count

2011-07-20 Thread Marko Rodriguez
@Marko I am using neo4j 1.4 server so I guess I am running gremlin 1.1. It would be cool if you can send me the compatible query when you have time. Good, cause time is all I have. m = [:]

Re: [Neo4j] Getting sorted results from a traversal

2011-07-15 Thread Marko Rodriguez
Hi Pere, To sort you need to have all your results. Thus, in Gremlin (and hopefully you can do the mapping to the core Neo4j traverser framework), results = [] g.v(1).out('friend').out('likes') results // what my friends like results.sort{a,b - a.name = b.name} // sort resultant vertices by

Re: [Neo4j] Getting sorted results from a traversal

2011-07-15 Thread Marko Rodriguez
the computation by the db. / purbon On 15 July 2011 16:10, Marko Rodriguez okramma...@gmail.com wrote: Hi Pere, To sort you need to have all your results. Thus, in Gremlin (and hopefully you can do the mapping to the core Neo4j traverser framework), results = [] g.v(1).out('friend

Re: [Neo4j] [Blog Post] Graphs, Brains, and Gremlin

2011-07-15 Thread Marko Rodriguez
Hi Rick, Added a comment and a book recommendation to your blog. Thanks. On Intelligence is the first reference in the references section of the post --- along with some other goodies. Thanks for reading and commenting, Marko. http://markorodriguez.com

Re: [Neo4j] [Blog Post] Graphs, Brains, and Gremlin

2011-07-15 Thread Marko Rodriguez
Nice. It's a very though provoking (pun clearly intended) blog post. I need to read it a couple times to fully grok it. I put many links to associated reading (primarily on Wikipedia). If you don't have experience with elementary cognitive neuroscience, then you can learn all you need to

Re: [Neo4j] Getting sorted results from a traversal

2011-07-15 Thread Marko Rodriguez
Bayes Sent: Friday, July 15, 2011 11:05 AM To: Neo4j user discussions Subject: Re: [Neo4j] Getting sorted results from a traversal Well, this is great if I want to do all the math in memory, but I expect to do the computation by the db. / purbon On 15 July 2011 16:10, Marko Rodriguez

Re: [Neo4j] Getting sorted results from a traversal

2011-07-15 Thread Marko Rodriguez
Hey, Actually, I was just Googling and found this cool library: http://code.google.com/p/pcollections/ This way you have Set, Vector, etc. persisted. Perhaps that could help you out Pere. See ya, Marko. http://markorodriguez.com On Jul 15, 2011, at 12:30 PM, Marko Rodriguez wrote

Re: [Neo4j] Getting sorted results from a traversal

2011-07-15 Thread Marko Rodriguez
Hey, Isn't that pretty similar to what https://github.com/peterneubauer/graph-collectionshttps://github.com/peterneubauer/graph-collections/tree/master/src/main/java/org/neo4j/collections/sortedtree provides for Neo4j? I dunno. I haven't played with Graph Collections. But I assume so if it

Re: [Neo4j] gremlin tables question

2011-07-15 Thread Marko Rodriguez
Hi, Do: t=new Table();v = g.v(2);v.outE.inV.as('node')[0..5].table(t) -1; t; Read the first trouble shooting for the reason: https://github.com/tinkerpop/gremlin/wiki/Troubleshooting v.outE.inV.as('node')[0..5].table(t) returns an iterator.

  1   2   3   >