[Neo4j] Paged traversal REST API suggestion for improvement

2011-07-27 Thread Aseem Kishore
Hey there,

Neo4j's REST API is overall quite awesome and impressive -- it's just such a
great *actual* REST API.

I was just reading into paged traversals (
http://docs.neo4j.org/chunked/stable/rest-api-traverse.html ) and couldn't
help but feel that this isn't the best way to do paging over REST.

I dig that you POST to create a paged traverser, which returns a 201 with a
Location set to the traverser -- the traverser is indeed a real resource on
the server.

But, it caught me off guard that you page by repeatedly GETting the same
resource over and over. In other words, the resource is changing each time
you GET it. Doesn't that violate GET, that state on the server shouldn't be
visibly changed, or that GETting the same resource multiple times should
return that same resource each time?

I've seen other paging APIs return a "next" token in each response, and you
include that token in your next request, either as a header or in the query
string. I've also seen the simple "?page=2" or "/page/2" approach.

This is obviously not a dealbreaker, but it is a limitation -- I have to
remember the results on my end and can't refetch them if e.g. the user
refreshes the page in their browser. That kinda sucks.

What are your guys' thoughts?

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


Re: [Neo4j] Neo4j Spatial and gtype property

2011-07-27 Thread Christopher Schmidt
So best is to use SpatialDatabaseRecord.getGeometry()?

Christopher

On Wed, Jul 27, 2011 at 10:50 PM, Craig Taverner  wrote:

> Actually we do allow multiple geometry types in the same layer, but some
> actions, like export to shapely, will fail. We even test for this in
> TestDynamicLayers.
>
> You can use the gtype if you want, but it is specific to some
> GeometryEncoders, and might change in future releases. It would be better
> to
> get the layers geometry encoder and use that.
> On Jul 27, 2011 6:04 PM, "Peter Neubauer" <
> peter.neuba...@neotechnology.com>
> wrote:
> > Christopher,
> > What do you mean by allowing to use? Yes, these properties are used to
> > store the Geometry Type for a Layer and for geometry nodes. Sadly, you
> > cannot have more than one Geometry in Layers due to the limitations of
> > e.g. the GeoTools stack.
> >
> > 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   - Your high performance graph
> database.
> > http://startupbootcamp.org/- Öresund - Innovation happens HERE.
> > http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
> >
> >
> >
> > On Wed, Jul 27, 2011 at 4:07 AM, Christopher Schmidt
> >  wrote:
> >> Hi all,
> >>
> >> is it allowed to use the gtype-property to get the geometry type
> numbers?
> >>
> >> (Which are defined in org.neo4j.gis.spatial.Constants)
> >>
> >> --
> >> Christopher
> >> twitter: @fakod
> >> blog: http://blog.fakod.eu
> >> ___
> >> 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
>



-- 
Christopher
twitter: @fakod
blog: http://blog.fakod.eu
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] HyperRelationship example

2011-07-27 Thread John cyuczieekc
Hey Niels,

I like xD
this seems like a lot of work and professionally done; ie. something I could
not have done (I don't have that kind of experience and focus). Gratz on
that, I really appreciate seeing this.

I cloned the repo from git, manually, with eclipse (not using maven - don't
know how with eclipse)
I am getting only about 3 compile errors, like:
1) The type BinaryRelationshipRoles must implement the inherited abstract
method PropertyContainer.getId()
2) The constructor PropertyType(String, GraphDatabaseService) is not
visible
3) The return type is incompatible with
RelationshipContainer.getRelationships()
for
org.neo4j.collections.graphdb.impl.RelationshipIterable.RelationshipIterable(Iterable
rels)


  Also, I am thinking to try and implement this on top of berkeleydb just
for fun/benchmarking (so to speak) to compare between that and neo4j - since
I am currently unsure which one to use for my hobby project (I like that
berkeleydb's searches are 0-1ms instead of few seconds)

Btw, would it be any interest to you if I were to fork your repo and add ie.
AllTests.java for junit and the .project and related files for eclipse
project in a pull or two ? as long as it doesn't seem useless or
cluttering... (note however I never actually, yet, used fork&pull but only
read about it on github xD)

Thanks to all, for wasting some time reading this,
Greeting and salutations,
John

On Wed, Jul 27, 2011 at 8:48 PM, Niels Hoogeveen
wrote:

>
> I just posted an example on how to use HyperRelationships:
>
>
> https://github.com/peterneubauer/graph-collections/wiki/HyperRelationship-example
>
> There is now a proper test for HyperRelationships, so I hereby push the
> software to Beta status.
>
> Please try out the Enhanced API and HyperRelationships and let me know what
> needs improvement.
>
> Niels
> ___
> 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] Events this Week

2011-07-27 Thread John cyuczieekc
Hey Allison,

Just checking, those meet-ups are not accessible via internet (ie. live
streamed or something) right?
Otherwise, looking forward for the webinar, thanks!

On Wed, Jul 27, 2011 at 8:28 PM, Allison Sparrow <
allison.spar...@neotechnology.com> wrote:

> Hi all,
>
> Just a reminder on three events we have to close off the week:
>
> *TONIGHT at 18:00 PDT*
> Vancouver Meetup | Reference Node: Creating a Graph:
> www.meetup.com/graphdb-vancouver/events/24143031/
> *
> TONIGHT at 19:00 PDT*
> Seattle Meetup | Discussions with Andreas Kollegger:
> www.meetup.com/graphdb-seattle/events/21044691/
> *
> TOMORROW at 10:00 PDT
> *
> Webinar | Getting Started with Neo4j:
> https://www1.gotomeeting.com/register/855127096
>
> See you there,
>
> *Allison Sparrow* *
> **Marketing Manager | Neo Technology*
> +19499036091 | @ayeeson 
> ___
> 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] Enhanced API and HyperRelationships

2011-07-27 Thread Niels Hoogeveen

Integrated IndexedRelationships functionality into the Enhanced API, so 
relationships of a certain type are maintained in a Btree, while they can be 
manipulated through the API just like any other relationship.
Still need to test this one.
As mentioned earlier today, HyperRelationships and Enhanced API now have a set 
of tests which they pass.

Niels

> From: pd_aficion...@hotmail.com
> To: user@lists.neo4j.org
> Date: Tue, 26 Jul 2011 22:13:59 +0200
> Subject: Re: [Neo4j] Enhanced API and HyperRelationships
> 
> 
> A first stab at implementing the Enhanced API and HyperRelationships is 
> finished. It still needs thorough testing, so this is PRE-ALPHA quality.It 
> also still lacks proper documentation (java docs).The source code can be 
> found 
> at:https://github.com/peterneubauer/graph-collections/tree/master/src/main/java/org/neo4j/collections/graphdbA
>  description can be found 
> at:https://github.com/peterneubauer/graph-collections/wiki/Enhanced-APINiels
> > From: pd_aficion...@hotmail.com
> > To: user@lists.neo4j.org
> > Date: Tue, 26 Jul 2011 01:02:20 +0200
> > Subject: Re: [Neo4j] Enhanced API and HyperRelationships
> > 
> > 
> > The implementation of HyperRelationships needs another day of work, though 
> > the hard parts are finished now.
> > 
> > Time to explain the inner workings of HyperRelationships.
> > 
> > HyperRelationships are a generalization of the binary relationships found 
> > in Neo4j. 
> > 
> > Instead of creating a relationship from a node to another node, 
> > we define a HyperRelationship as a set of Nodes each having a 
> > RelationshipRole within the HyperRelationship.
> > 
> > For the binary case the RelationshipRoles are StartNode and EndNode. 
> > For HyperRelationships with an arity higher than 2, the Roles need to be 
> > defined for each HyperRelationshipType.
> > 
> > A HyperRelationship is layed-out in the database as a regular relationship 
> > in the binary case.
> > 
> > For HyperRelationship with an arity higher than 2, a Node is created 
> > subsuming the role of Relationship. 
> > From this Node, binary relationships (regular Neo4J relationships) are 
> > created for each Element of the relationship. 
> > 
> > The RelationshipTypes of these binary relationships are a concatenation of 
> > the name of the HyperRelationshipType used 
> > and the RelationshipRole of the attached Element.
> > 
> > Example: 
> > 
> > Suppose we want to store the fact that Flo and Eddie give Tom, Dick and 
> > Harry a Book.
> > 
> > This is a ternary relationship, with the following RelationshipRoles:
> > 
> > Giver: Flo and Eddie
> > Recipient: Tom, Dick and Harry
> > Gift: Book
> > 
> > The GIVE relationship is first created with a Set of Roles (Giver, 
> > Recipient and Gift). 
> > When the example relation is created the following binary relationships 
> > will be create:
> > 
> > HyperRelationshipNode --GIVE/#/Giver--> Flo
> > HyperRelationshipNode --GIVE/#/Giver--> Eddie
> > HyperRelationshipNode --GIVE/#/Recipient--> Tom
> > HyperRelationshipNode --GIVE/#/Recipient--> Dick
> > HyperRelationshipNode --GIVE/#/Recipient--> Harry
> > HyperRelationshipNode --GIVE/#/Gift--> Book
> > 
> > We can now retrieve all Relationships where Flo is the Giver in a GIVE 
> > relationship, 
> > simply by concatenating GiVE and Giver into GIVE/#/Giver, 
> > and then ask all incoming Relationships with that RelationshipType. 
> > 
> > This fetches the HyperRelationship nodes and the other attached Elements of 
> > the HyperRelationship can be loaded.
> > 
> > I added an extra interface FunctionalRelationshipRole, which restricts the 
> > number of Elements attached to a RelationshipRole within a 
> > HyperRelationship to one.
> > 
> > The use of this amounts to something similar to having a 
> > getSingleRelationship method, 
> > which cannot throw an Exception, because multiple entries with the same 
> > RelationshipType cannot be created by design.
> > 
> > Niels
> > > From: pd_aficion...@hotmail.com
> > > To: user@lists.neo4j.org
> > > Date: Mon, 25 Jul 2011 02:03:54 +0200
> > > Subject: [Neo4j] Enhanced API and HyperRelationships
> > > 
> > > 
> > > Today I wrote a piece about the Enhanced API and about 
> > > HyperRelationships, I have been working on over the last couple of days.
> > > 
> > > See: https://github.com/peterneubauer/graph-collections/wiki/Enhanced-API
> > > 
> > > The API as presented in the graph-collections repo on Git is not feature 
> > > complete yet with respect to HyperRelationships. 
> > > The interfaces are there, but the implementation only works for binary 
> > > relationships at present. Need one more day for the implementation.
> > > 
> > > I posted the Wiki page and the source code to open the discussion about 
> > > these new features.
> > > 
> > > Niels   
> > > ___
> > > Neo4j mailing list
> > > User@lists.neo4j.org
> > > https://lists.neo4j.org/mailman/listinfo/user
> >  

Re: [Neo4j] auto indexes in REST in 1.4?

2011-07-27 Thread dhsieh
Same probelm here. Downloaded "neo4j-enterprise-1.4.M02-unix.tar.gz" with
deafult installtion on Linux. Added the foolwoing lines to neo4j.properties
file: 

node_auto_indexing=true 
node_keys_indexable=name,age 

relationship_auto_indexing=true 
relationship_keys_indexable=ROOT,KNOWS,CODED_BY 

Started the neo4j server, use neo4j-shell and added Neo4j Wiki Matrix
example nodes & relationships. 

>From http://localhost:7474/db/data/, browser shows Neo4j REST interface
links as: 

Root relationship_index /db/data/index/relationship 
node_index /db/data/index/node 
reference_node /db/data/node/0 

However, the fisrt 2 links /db/data/index/relationship & /db/data/index/node
show nothing about the auto indexes for node & relstionship I specified in
neo4j.properties file. Not sure if this feature actually works in the
current 1.4.M02 build. Can any one pitch in on this issue?

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-auto-indexes-in-REST-in-1-4-tp3159205p3205171.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] how to scale and view or generate reports for complex graphs?

2011-07-27 Thread Niels Hoogeveen

Hi Sambodhi,
One of the means to organize complexity is by adding meta information to your 
database. This first of all helps you organize what relationships and 
properties belong to what sort of node, it may also help answer questions such 
as: what nodes belong to what type/class.
Niels


> Date: Wed, 27 Jul 2011 23:23:45 +0100
> From: sambodhi.s...@gmail.com
> To: user@lists.neo4j.org
> Subject: [Neo4j] how to scale and view or generate reports for complex
> graphs?
> 
> Hi Guys!
> 
> I am a bit new to Graph database. I really liked the concept, graph made
> managing relationship between the entities relatively easy. I therefore
> chose to use it in my new project. I started the development two weeks back
> and my graph has already grown so complex with static data. I am wondering
> when it goes to production with thousands of users, how would we manage it.
> What really bothers me is :
> 
> a. how do view such a complex graph? I use neoecplise but am not sure it
> would be able to accommodate thousands of nodes and at the same time it
> would be easy to eyes to find a particular node.
> 
> b. is there any kind of report generation tool ?
> 
> c. how to scale the graph? i read few article on it but it got me more
> confused. Would be really helpful if you can provide a link to a relevant
> document.
> 
> Many Thanks!
> Sambodhi
> ___
> 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] how to scale and view or generate reports for complex graphs?

2011-07-27 Thread sambodhi sagi
Hi Guys!

I am a bit new to Graph database. I really liked the concept, graph made
managing relationship between the entities relatively easy. I therefore
chose to use it in my new project. I started the development two weeks back
and my graph has already grown so complex with static data. I am wondering
when it goes to production with thousands of users, how would we manage it.
What really bothers me is :

a. how do view such a complex graph? I use neoecplise but am not sure it
would be able to accommodate thousands of nodes and at the same time it
would be easy to eyes to find a particular node.

b. is there any kind of report generation tool ?

c. how to scale the graph? i read few article on it but it got me more
confused. Would be really helpful if you can provide a link to a relevant
document.

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


Re: [Neo4j] Neo4j Spatial and gtype property

2011-07-27 Thread Craig Taverner
Actually we do allow multiple geometry types in the same layer, but some
actions, like export to shapely, will fail. We even test for this in
TestDynamicLayers.

You can use the gtype if you want, but it is specific to some
GeometryEncoders, and might change in future releases. It would be better to
get the layers geometry encoder and use that.
On Jul 27, 2011 6:04 PM, "Peter Neubauer" 
wrote:
> Christopher,
> What do you mean by allowing to use? Yes, these properties are used to
> store the Geometry Type for a Layer and for geometry nodes. Sadly, you
> cannot have more than one Geometry in Layers due to the limitations of
> e.g. the GeoTools stack.
>
> 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   - Your high performance graph database.
> http://startupbootcamp.org/- Öresund - Innovation happens HERE.
> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>
>
>
> On Wed, Jul 27, 2011 at 4:07 AM, Christopher Schmidt
>  wrote:
>> Hi all,
>>
>> is it allowed to use the gtype-property to get the geometry type numbers?
>>
>> (Which are defined in org.neo4j.gis.spatial.Constants)
>>
>> --
>> Christopher
>> twitter: @fakod
>> blog: http://blog.fakod.eu
>> ___
>> 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] update node properties via rest?

2011-07-27 Thread Javier de la Rosa
On Wed, Jul 27, 2011 at 14:57, Boris Kizelshteyn  wrote:
> It does not infact update, it overwrites. Feature or bug?

I asked me the same question and I decided it was a feature...



-- 
Javier de la Rosa
http://versae.es
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] update node properties via rest?

2011-07-27 Thread Boris Kizelshteyn
It's the basic documented update form the manual post to /properties. You
can even do it in the console and it will exhibit the behaviour. I you need
it I will send you my query later on ...

Thanks!



>
>
> On Wed, Jul 27, 2011 at 2:59 PM, Peter Neubauer <
> peter.neuba...@neotechnology.com> wrote:
>
>> Boris,
>> do you have the http requests to recreate this?
>>
>> 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   - Your high performance graph
>> database.
>> http://startupbootcamp.org/- Öresund - Innovation happens HERE.
>> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>>
>>
>>
>> On Wed, Jul 27, 2011 at 11:57 AM, Boris Kizelshteyn 
>> wrote:
>> > It does not infact update, it overwrites. Feature or bug?
>> > ___
>> > 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] auto indexes in REST in 1.4?

2011-07-27 Thread brandon.l
We are currently on the linux version of neo4j-enterprise-1.4.M02 and can't
seem to figure out auto indexing.  After updating the neo4j.properties file
to enable auto_indexing and restarting we always get an exception for
org.neo4j.graphdb.NotFoundException when trying to find a node using the
REST api.

The format of our request is the following.
http://:7474/db/data/index/node/node_auto_index/{key}/{value}

Has anyone been able to enable auto indexing?


--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-auto-indexes-in-REST-in-1-4-tp3159205p3204498.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] update node properties via rest?

2011-07-27 Thread Peter Neubauer
Boris,
do you have the http requests to recreate this?

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               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Wed, Jul 27, 2011 at 11:57 AM, Boris Kizelshteyn  wrote:
> It does not infact update, it overwrites. Feature or bug?
> ___
> 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] update node properties via rest?

2011-07-27 Thread Boris Kizelshteyn
It does not infact update, it overwrites. Feature or bug?
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] HyperRelationship example

2011-07-27 Thread Niels Hoogeveen

I just posted an example on how to use HyperRelationships:

https://github.com/peterneubauer/graph-collections/wiki/HyperRelationship-example

There is now a proper test for HyperRelationships, so I hereby push the 
software to Beta status.

Please try out the Enhanced API and HyperRelationships and let me know what 
needs improvement.

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


[Neo4j] Events this Week

2011-07-27 Thread Allison Sparrow
Hi all,

Just a reminder on three events we have to close off the week:

*TONIGHT at 18:00 PDT*
Vancouver Meetup | Reference Node: Creating a Graph:
www.meetup.com/graphdb-vancouver/events/24143031/
*
TONIGHT at 19:00 PDT*
Seattle Meetup | Discussions with Andreas Kollegger:
www.meetup.com/graphdb-seattle/events/21044691/
*
TOMORROW at 10:00 PDT
*
Webinar | Getting Started with Neo4j:
https://www1.gotomeeting.com/register/855127096

See you there,

*Allison Sparrow* *
**Marketing Manager | Neo Technology*
+19499036091 | @ayeeson 
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] REST batch operation to search->create/edit

2011-07-27 Thread Peter Neubauer
David,
if you want to do conditions etc, I would suggest sending a Gremlin
script that does this for you via the REST Gremlin extension, see
http://docs.neo4j.org/chunked/snapshot/gremlin-plugin.html for
details. Would that work?

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               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Wed, Jul 27, 2011 at 9:48 AM, daveygravey  wrote:
> Is it possible through the REST interface to use a batch transactional
> operation to:
>
> 1. Search to see if a node exists
> 2. if it does exist, then return the node (no problem)
> 3. If it does not exist then create and return the node
>
> If this is not possible via the REST interface, could someone confirm that
> it is possible through the Java API.
>
> Thanks,
> Dave
>
>
>
>
> --
> View this message in context: 
> http://neo4j-community-discussions.438527.n3.nabble.com/REST-batch-operation-to-search-create-edit-tp3204073p3204073.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] Implementation of neo4j

2011-07-27 Thread Jim Webber
Using the Java version typically gives you (slightly) more powerful API 
compared to the REST API.

My rule of thumb is: if you can use the embedded version in your architecture, 
then you should.

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


Re: [Neo4j] Pagination in Embedded

2011-07-27 Thread Jim Webber
Hi John,

OK, gotcha. I didn't realise there's a network hop in there too.

Go ahead on use the PagingIterator.

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


[Neo4j] REST batch operation to search->create/edit

2011-07-27 Thread daveygravey
Is it possible through the REST interface to use a batch transactional
operation to:

1. Search to see if a node exists
2. if it does exist, then return the node (no problem)
3. If it does not exist then create and return the node

If this is not possible via the REST interface, could someone confirm that
it is possible through the Java API.

Thanks,
Dave




--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/REST-batch-operation-to-search-create-edit-tp3204073p3204073.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 and gtype property

2011-07-27 Thread Peter Neubauer
Christopher,
What do you mean by allowing to use? Yes, these properties are used to
store the Geometry Type for a Layer and for geometry nodes. Sadly, you
cannot have more than one Geometry in Layers due to the limitations of
e.g. the GeoTools stack.

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               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Wed, Jul 27, 2011 at 4:07 AM, Christopher Schmidt
 wrote:
> Hi all,
>
> is it allowed to use the gtype-property to get the geometry type numbers?
>
> (Which are defined in org.neo4j.gis.spatial.Constants)
>
> --
> Christopher
> twitter: @fakod
> blog: http://blog.fakod.eu
> ___
> 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] Pagination in Embedded

2011-07-27 Thread John Howard
My scenario is: If there 1000 results from an index query, I would like to
send 100 at a time to the requesting client(ie, browser).
Which means browser will make 10 calls to get all the results by passing
either the page number or the next start result(ie, 11, 21, 31 etc) in each
call.

It looks like the PagingIterator seems to fit my scenario.
Does the neo4j team recommend using the PagingIterator for this purpose?

Appreciate all the responses.

John


On Wed, Jul 27, 2011 at 8:58 AM, John cyuczieekc wrote:

> Looks like John H. means, how do you get all results for page N and only
> for
> page N ? without the overhead of getting thru all other results; so far, as
> I understand it (also from what Jim said), you'll have to parse all the
> results for all pages prior to page N, to get to page N, but not the
> results
> after page N.
>
> On Wed, Jul 27, 2011 at 9:53 AM, Jim Webber  wrote:
>
> > Hi John,
> >
> > In an embedded scenario, pagination doesn't make as much sense. Since
> calls
> > to the embedded APIs typically return a lazily-evaluatable iterable
> you
> > just call next() to efficiently advance through the results.
> >
> > 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
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Graph database index | query across indices

2011-07-27 Thread sambodhi
please click 
https://docs.google.com/leaf?id=0B_KtEQOQZhiJOTU4NDNkYjUtMTRhZS00MDgwLWI3NjEtYmZjNTM5NGNhNjVj&hl=en_US
here  to see my 
https://docs.google.com/leaf?id=0B_KtEQOQZhiJOTU4NDNkYjUtMTRhZS00MDgwLWI3NjEtYmZjNTM5NGNhNjVj&hl=en_US
graph 


--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Graph-database-index-query-across-indices-tp3203597p3203647.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] Enhanced API and HyperRelationships

2011-07-27 Thread Niels Hoogeveen

Added a test for Enhanced API and HyperRelationships. Reification works 
correctly, HyperRelationships works correctly for binary relationships. Still 
need to add tests for HyperRelationships with higher arity (will do so later 
today).
Niels

> From: pd_aficion...@hotmail.com
> To: user@lists.neo4j.org
> Date: Wed, 27 Jul 2011 00:04:32 +0200
> Subject: Re: [Neo4j] Enhanced API and HyperRelationships
> 
> 
> Hi Peter,
> I will start writing test-code first. Some nice creation code will definitely 
> be part of that, which I will post on the graph-collections Wiki, together 
> with the resulting data (reminder to self: install neoclipse to make neat 
> images of the graph).
> The Enhanced stuff still needs thorough testing. My Scala app only uses the 
> non-enhanced features, so it was basically a test proving the wrappers all 
> work properly. In two or three days, I am confident the software is ready for 
> others to try out.
> Niels
> 
> > From: peter.neuba...@neotechnology.com
> > Date: Tue, 26 Jul 2011 14:48:36 -0700
> > To: user@lists.neo4j.org
> > Subject: Re: [Neo4j] Enhanced API and HyperRelationships
> > 
> > That is cool Niels,
> > I am looking forward to you testing it out, maybe some else people?
> > Also, I would love to see how to query such a structure at the API
> > level. Could you post some nice creation code and the resulting graph
> > so we can see how it looks?
> > 
> > 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   - Your high performance graph database.
> > http://startupbootcamp.org/- Öresund - Innovation happens HERE.
> > http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
> > 
> > 
> > 
> > On Tue, Jul 26, 2011 at 2:44 PM, Niels Hoogeveen
> >  wrote:
> > >
> > > I just ported my own application 12kloc of Scala code to use the Enhance 
> > > API and got it working. Of course more thorough testing needs to be done, 
> > > but it proves that at least in the case of my own application the 
> > > Enhanced API can work as a drop-in replacement.
> > > Niels
> > >
> > >> From: pd_aficion...@hotmail.com
> > >> To: user@lists.neo4j.org
> > >> Date: Tue, 26 Jul 2011 22:13:59 +0200
> > >> Subject: Re: [Neo4j] Enhanced API and HyperRelationships
> > >>
> > >>
> > >> A first stab at implementing the Enhanced API and HyperRelationships is 
> > >> finished. It still needs thorough testing, so this is PRE-ALPHA 
> > >> quality.It also still lacks proper documentation (java docs).The source 
> > >> code can be found 
> > >> at:https://github.com/peterneubauer/graph-collections/tree/master/src/main/java/org/neo4j/collections/graphdbA
> > >>  description can be found 
> > >> at:https://github.com/peterneubauer/graph-collections/wiki/Enhanced-APINiels
> > >> > From: pd_aficion...@hotmail.com
> > >> > To: user@lists.neo4j.org
> > >> > Date: Tue, 26 Jul 2011 01:02:20 +0200
> > >> > Subject: Re: [Neo4j] Enhanced API and HyperRelationships
> > >> >
> > >> >
> > >> > The implementation of HyperRelationships needs another day of work, 
> > >> > though the hard parts are finished now.
> > >> >
> > >> > Time to explain the inner workings of HyperRelationships.
> > >> >
> > >> > HyperRelationships are a generalization of the binary relationships 
> > >> > found in Neo4j.
> > >> >
> > >> > Instead of creating a relationship from a node to another node,
> > >> > we define a HyperRelationship as a set of Nodes each having a 
> > >> > RelationshipRole within the HyperRelationship.
> > >> >
> > >> > For the binary case the RelationshipRoles are StartNode and EndNode.
> > >> > For HyperRelationships with an arity higher than 2, the Roles need to 
> > >> > be defined for each HyperRelationshipType.
> > >> >
> > >> > A HyperRelationship is layed-out in the database as a regular 
> > >> > relationship in the binary case.
> > >> >
> > >> > For HyperRelationship with an arity higher than 2, a Node is created 
> > >> > subsuming the role of Relationship.
> > >> > From this Node, binary relationships (regular Neo4J relationships) are 
> > >> > created for each Element of the relationship.
> > >> >
> > >> > The RelationshipTypes of these binary relationships are a 
> > >> > concatenation of the name of the HyperRelationshipType used
> > >> > and the RelationshipRole of the attached Element.
> > >> >
> > >> > Example:
> > >> >
> > >> > Suppose we want to store the fact that Flo and Eddie give Tom, Dick 
> > >> > and Harry a Book.
> > >> >
> > >> > This is a ternary relationship, with the following RelationshipRoles:
> > >> >
> > >> > Giver: Flo and Eddie
> > >> > Recipient: Tom, Dick and Harry
> > >> > Gift: Book
> > >> >
> > >> > The GIVE relationship is first created with a Set of Roles (Giver, 
> > >> > Recipient and Gift).
> > >> > When the example relation is created th

Re: [Neo4j] How to download neo4j 1.3 [for using jo4Neo]

2011-07-27 Thread Anders Nawroth
Hi!

Using a firewall to block 7474 to the outside world?

/anders

2011-07-27 16:25, BatiG skrev:
> But it's not possible to use WrappingNeoServerBootstrapper and Nginx?
>
> I can deny or allow some IP address from nginx but the problem is that
> WrappingNeoServerBootstrapper runs an instance of Jetty.. So it's not
> possible to set nginx over jetty.
>
> And if I create a proxy with nginx, the port 7474 of jetty is still open and
> everybody can connect to this port..
>
> Have you an idea?
>
> --
> View this message in context: 
> http://neo4j-community-discussions.438527.n3.nabble.com/How-to-download-neo4j-1-3-for-using-jo4Neo-tp3191002p3203594.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] Graph database index | query across indices

2011-07-27 Thread sambodhi sagi
Hi !

I am facing some problem with indexing. My graph looks like this:




Say, I want to query products for a particular category (say 'Phone,Mobiles
and telecoms') AND having text 'attractive' in 'details' field. I created
two indices: one for Relationship 'RelProductIndex' and one for product
'ProductIndex'. Algo for what I exactly want to achieve :

typeHits = relProdctIndex.query( "type:Product", phoneAndTelecomCatNode,
null );
for each typeHits {
  productsInCatList.add(typeHits.getEndNode());
}

productsTextSearchHits = productIndex.query("details", "attractive");

resultantProducts =  common set between productsInCatList and
productsTextSearchHits

My query is something like this

QUERY-1 AND QUERY-2

QUERY-1 : EndNodes (say end node is a product) of a relationship of type
'Product' (this query is for RelProductIndex)
QUERY-2 : products which has text 'mobile' (this query is for ProductsIndex)

So basically what it requires is *compound query across two indices*.
Normally we donot do compound queries across indices but am not sure how to
handle this.* One solution* I can think of is to add 'details' property to
the relationship Product also. In this case I can use only relationship
index:

typeHits = relProdctIndex.query( "type:Product AND details:attractive",
phoneAndTelecomCatNode, null );

Problem I see with this approach is, I would end up indexing same field(or
key) in two different indices (Product node and Product relationship). This
might hit the performance.* Can there be a better approach to handle this?*
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] How to download neo4j 1.3 [for using jo4Neo]

2011-07-27 Thread BatiG
But it's not possible to use WrappingNeoServerBootstrapper and Nginx?

I can deny or allow some IP address from nginx but the problem is that
WrappingNeoServerBootstrapper runs an instance of Jetty.. So it's not
possible to set nginx over jetty.

And if I create a proxy with nginx, the port 7474 of jetty is still open and
everybody can connect to this port..

Have you an idea?

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/How-to-download-neo4j-1-3-for-using-jo4Neo-tp3191002p3203594.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] Concurrent access to Index

2011-07-27 Thread Rick Bullotta
You don't need to open multiple instances.  Simply share the instance across 
threads - it is thread safe.

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of paolo.forte
Sent: Wednesday, July 27, 2011 9:14 AM
To: user@lists.neo4j.org
Subject: [Neo4j] Concurrent access to Index

 Hello, 
 
 
I'm testing neo4j (1.4) with a massive and continuous process: I have an 
instance of EmbeddedGraphDatabase where each node must be unique (a node 
identify a userid). My current problem is that when I try to open another 
instance of graphdb with EmbeddedReadOnlyGraphDatabase in order to query the 
graph (meanwhile the first instance is still inserting new data) I experienced 
the following error: Exception in thread "main" 
java.lang.reflect.InvocationTargetException    at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)   
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
  at java.lang.reflect.Method.invoke(Method.java:601)    at 
org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)Caused
 by: java.lang.RuntimeException: java.io.FileNotFoundException: 
/data/neo4j/metadata.db/index/lucene/node/users_id/_22j1m.cfs (No such file or 
directory)    at 
org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:601)  
  at 
org.neo4j.index.impl.lucene.LuceneDataSource.getIndexSearcher(LuceneDataSource.java:484)  
  at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:248)    at 
org.neo4j.index.impl.lucene.LuceneIndex.get(LuceneIndex.java:187)    at 
nosql.metadata.test.Neo4JQueryTest.main(Neo4JQueryTest.java:117)    ... 5 
moreCaused by: java.io.FileNotFoundException: 
/data/neo4j/metadata.db/index/lucene/node/users_id/_22j1m.cfs (No such file or 
directory)    at java.io.RandomAccessFile.open(Native Method)    at 
java.io.RandomAccessFile.(RandomAccessFile.java:233)    at 
org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput$Descriptor.(SimpleFSDirectory.java:69)  
  at 
org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput.(SimpleFSDirectory.java:90)  
  at 
org.apache.lucene.store.NIOFSDirectory$NIOFSIndexInput.(NIOFSDirectory.java:91)  
  at org.apache.lucene.store.NIOFSDirectory.openInput(NIOFSDirectory.java:78)   
 at 
org.apache.lucene.index.CompoundFileReader.(CompoundFileReader.java:66)   
 at 
org.apache.lucene.index.CompoundFileReader.(CompoundFileReader.java:55)   
 at org.apache.lucene.index.IndexWriter.getFieldInfos(IndexWriter.java:1193)    
at 
org.apache.lucene.index.IndexWriter.getCurrentFieldInfos(IndexWriter.java:1213)  
  at org.apache.lucene.index.IndexWriter.(IndexWriter.java:1149)    at 
org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:588)  
  ... 9 more
 
I can "recover" the db index renaming  the index segment (probably with loss of 
data) and try to recover it with CheckIndex   
 
Probably is my lack on knolodge on lucene indexing, but how can I (MULTIPLE) 
query in safe way the db without corrupting the lucene index segments? 
I also noted that if I start the server in read only mode (in order to connect 
to an EmbeddedGraphDatabase that continuously ingest new data) the webadmin 
interface doesn't update the number of nodes, edges and relationships are 
the two problems correlated? 
 
Thanks in advance for any suggestions and help.  
Paolo Forte
 
 
As a matter of fact I would like to understand how it is possible to write and 
read (query in read only mode) the db. 
___
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] OSGi and Neo4j - superbundle approach

2011-07-27 Thread Jörg Richter

Mmh, not really an idea so far.
The steps you describe look OK.

Try to build and install the Neo4j bundle alone:
cd neo4j-osgi/bundle
mvn clean install

Then try out this project:
https://github.com/jri/neo4j-osgi-test
It provisions a standalone Felix runtime (with the aid of Pax Runner).

There I also describe the steps that worked for me (seemingly the same as you 
tried :-|

Cheers,
Jörg


On Jul 26, 2011, at 23:37, Jean-Pierre Bergamin wrote:

> Helly everyone
> 
> I'm currently also stuck with the "No index provider 'lucene' found"
> error that you all seem to have been able to work around.
> I have built and installed the 1.5-SNAPSHOT kernel from the
> bundle-friendly-classloader branch and installed it locally (mvn
> install).
> When I run the neo4j-osgi tests I still get the mentioned lucene error:
> 
> ...
> [FelixDispatchQueue] DEBUG org.neo4j.examples.osgi.test-bundle -
> BundleEvent STOPPED
> ERROR: Bundle org.neo4j.examples.osgi.test-bundle [3] Error starting
> file:bundles/org.neo4j.examples.osgi.test-bundle_0.1.0.SNAPSHOT.jar
> (org.osgi.framework.BundleException: Activator start error in bundle
> org.neo4j.examples.osgi.test-bundle [3].)
> java.lang.IllegalArgumentException: No index provider 'lucene' found
>at 
> org.neo4j.kernel.IndexManagerImpl.getIndexProvider(IndexManagerImpl.java:76)
> ...
> 
> Failed tests:
>  neo4jStartupTest(org.neo4j.examples.osgi.OSGiTest)
>  bundleStartupTest(org.neo4j.examples.osgi.OSGiTest)
> 
> Is there anything else I have to to so that I get the examples up and running?
> 
> 
> Best regards,
> James

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


[Neo4j] Concurrent access to Index

2011-07-27 Thread paolo.forte
 Hello, 
 
 
I'm testing neo4j (1.4) with a massive and continuous process: I have an 
instance of EmbeddedGraphDatabase where each node must be unique (a node 
identify a userid). My current problem is that when I try to open another 
instance of graphdb with EmbeddedReadOnlyGraphDatabase in order to query the 
graph (meanwhile the first instance is still inserting new data) I experienced 
the following error: Exception in thread "main" 
java.lang.reflect.InvocationTargetException    at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)   
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
  at java.lang.reflect.Method.invoke(Method.java:601)    at 
org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)Caused
 by: java.lang.RuntimeException: java.io.FileNotFoundException: 
/data/neo4j/metadata.db/index/lucene/node/users_id/_22j1m.cfs (No such file or 
directory)    at 
org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:601)  
  at 
org.neo4j.index.impl.lucene.LuceneDataSource.getIndexSearcher(LuceneDataSource.java:484)  
  at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:248)    at 
org.neo4j.index.impl.lucene.LuceneIndex.get(LuceneIndex.java:187)    at 
nosql.metadata.test.Neo4JQueryTest.main(Neo4JQueryTest.java:117)    ... 5 
moreCaused by: java.io.FileNotFoundException: 
/data/neo4j/metadata.db/index/lucene/node/users_id/_22j1m.cfs (No such file or 
directory)    at java.io.RandomAccessFile.open(Native Method)    at 
java.io.RandomAccessFile.(RandomAccessFile.java:233)    at 
org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput$Descriptor.(SimpleFSDirectory.java:69)  
  at 
org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput.(SimpleFSDirectory.java:90)  
  at 
org.apache.lucene.store.NIOFSDirectory$NIOFSIndexInput.(NIOFSDirectory.java:91)  
  at org.apache.lucene.store.NIOFSDirectory.openInput(NIOFSDirectory.java:78)   
 at 
org.apache.lucene.index.CompoundFileReader.(CompoundFileReader.java:66)   
 at 
org.apache.lucene.index.CompoundFileReader.(CompoundFileReader.java:55)   
 at org.apache.lucene.index.IndexWriter.getFieldInfos(IndexWriter.java:1193)    
at 
org.apache.lucene.index.IndexWriter.getCurrentFieldInfos(IndexWriter.java:1213)  
  at org.apache.lucene.index.IndexWriter.(IndexWriter.java:1149)    at 
org.neo4j.index.impl.lucene.LuceneDataSource.getIndexWriter(LuceneDataSource.java:588)  
  ... 9 more
 
I can "recover" the db index renaming  the index segment (probably with loss of 
data) and try to recover it with CheckIndex   
 
Probably is my lack on knolodge on lucene indexing, but how can I (MULTIPLE) 
query in safe way the db without corrupting the lucene index segments? 
I also noted that if I start the server in read only mode (in order to connect 
to an EmbeddedGraphDatabase that continuously ingest new data) the webadmin 
interface doesn't update the number of nodes, edges and relationships are 
the two problems correlated? 
 
Thanks in advance for any suggestions and help.  
Paolo Forte
 
 
As a matter of fact I would like to understand how it is possible to write and 
read (query in read only mode) the db. 
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Pagination in Embedded

2011-07-27 Thread John cyuczieekc
Looks like John H. means, how do you get all results for page N and only for
page N ? without the overhead of getting thru all other results; so far, as
I understand it (also from what Jim said), you'll have to parse all the
results for all pages prior to page N, to get to page N, but not the results
after page N.

On Wed, Jul 27, 2011 at 9:53 AM, Jim Webber  wrote:

> Hi John,
>
> In an embedded scenario, pagination doesn't make as much sense. Since calls
> to the embedded APIs typically return a lazily-evaluatable iterable you
> just call next() to efficiently advance through the results.
>
> 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


[Neo4j] Implementation of neo4j

2011-07-27 Thread noppanit
Hi All,

I'm using embedded neo4j in Java right now, I just wanted to ask that is
there any drawback that I should concern about using embedded neo4j or any
benefit of doing that instead of using the server version and implement a
plugin to extend the functionality. In terms of performance and usability as
well. 

Thank you very much. 

T.

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Implementation-of-neo4j-tp3203161p3203161.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] Pagination in Embedded

2011-07-27 Thread noppanit
Hi, I'm using the embedded version as well and about to implement pagination.
Could I use
http://api.neo4j.org/current/org/neo4j/helpers/collection/PagingIterator.html
this helper to achieve that? but that also means it will return everything
and cache that to be called nextPage()? 

Also what implementation of neo4j would be better in this scenario?

Thanks. 
T

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Pagination-in-Embedded-tp3202018p3203156.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 Spatial and gtype property

2011-07-27 Thread Christopher Schmidt
Hi all,

is it allowed to use the gtype-property to get the geometry type numbers?

(Which are defined in org.neo4j.gis.spatial.Constants)

-- 
Christopher
twitter: @fakod
blog: http://blog.fakod.eu
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] nested transactions "feature" ?

2011-07-27 Thread John cyuczieekc
thanks for that, the github help was most helpful
Meanwhile I realized why calling failure() on the child transaction flags
the root as failed, mainly because the child transaction cannot be reused
and thus we cannot know if it was retried or not, this being the difference
between child transactions that failed and child transactions that failed
but were retried and the retry was successful; this explains `point 2)` and
thus I agree with the current implementation... I am trying to emulate
nested transactions with this possibility of reusing a failed child
transaction such that the parent/root one doesn't need to be flagged as
failed , but doing it with bdb not neo4j...

However `point 1)` still remains unaddressed (though I didn't update from
github yet to see if it was fixed, or I simply don't understand it right)


On Sun, Jul 24, 2011 at 4:10 PM, Peter Neubauer <
peter.neuba...@neotechnology.com> wrote:

> Thanks John for the details!
>
> As for the GIThub workflow:
>
> http://www.eqqon.com/index.php/Collaborative_Github_Workflow
>
> and http://help.github.com/
>
> are good starting points!
>
> 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   - Your high performance graph database.
> http://startupbootcamp.org/- Öresund - Innovation happens HERE.
> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>
>
>
> On Sun, Jul 24, 2011 at 3:54 PM, John cyuczieekc 
> wrote:
> > Hey Peter,
> >
> > "Got any good working we could change to?"
> > I'm not sure I understand what you mean, do you mean that if I have any
> good
> > text to add to the javadoc so it's stated more clearly ? or something
> > related to code instead? but if code, to do what?
> >
> > I understand that they are using the topmost transaction now, *1)* but
> what
> > I would potentially expect from the nested transaction (semantics) is to
> > either default to fail(?) or have it stated in the docs that it defaults
> to
> > success even if success() isn't invoked (when finish() is reached), which
> is
> > opposite than the parent root transaction which defaults to fail if
> > success() isn't invoked.
> >  *2)* But also another issue with this, is that if the nested transaction
> > called fail() - and this may explain why it doesn't default to fail() -
> then
> > the parent transaction's state is fail() and can never be changed to
> > success() again. I might want to potentially be using a nested
> transaction
> > which could fail and even throw exception(which I would handle and
> possibly
> > redo that nested transaction from the beginning) but I wouldn't want the
> > parent transaction to fail because of that, especially since I managed to
> > handle the failed nested transaction by eventually creating a new one
> which
> > success-ed. In other words, if any nested fails, the entire tree chain of
> > transactions must be aborted (that's how it is now).
> >
> >  Would definitely be a great idea to state these in the (java)docs.
> Thanks!
> >
> > About the fork and pull request, I'd have to learn what they do and how
> to
> > use them, ... in general I get the idea of what you're saying, I could
> code
> > some modifs and you could check them out and if agreed upon you could add
> > them to neo4j - or something, that's what I understand from that, but
> > nothing about the details yet, must read...
> >
> > On Sun, Jul 24, 2011 at 3:25 PM, Peter Neubauer <
> > peter.neuba...@neotechnology.com> wrote:
> >
> >> Hi there,
> >> yes, nested transactions are really using the most topmost transaction
> >> for control, so your assessment if the commit semantics is right (I
> >> think). Talked to Tobias about this, and maybe we could state this
> >> more clearly in the docs. Got any good working we could change to?
> >> Feel free to fork and send a pull request!
> >>
> >> 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   - Your high performance graph
> database.
> >> http://startupbootcamp.org/- Öresund - Innovation happens HERE.
> >> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
> >>
> >>
> >>
> >> On Thu, Jul 21, 2011 at 7:29 PM, cyuczi eekc 
> wrote:
> >> > Hello.
> >> > Are nested transaction supported?
> >> > From what I'm testing here, it looks like unless I specify .failure()
> on
> >> the
> >> > nested transaction, before it reaches .finish() the transaction is
> >> > considered to be successful (even if I didn't call .success() on it).
> >> Though
> >> > if I do call .failure() then the root transaction will be rolled back
> >> with
> >> > exception:
> >> > Excepti

Re: [Neo4j] Pagination in Embedded

2011-07-27 Thread Jim Webber
Hi John,

In an embedded scenario, pagination doesn't make as much sense. Since calls to 
the embedded APIs typically return a lazily-evaluatable iterable you just 
call next() to efficiently advance through the results.

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


Re: [Neo4j] Neo4j and chat log structure

2011-07-27 Thread noppanit
Thanks. :)

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-and-chat-log-structure-tp3198962p3202782.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