Re: [Neo4j] Relationship indexes

2011-12-04 Thread Peter Neubauer
Frank,
Do you have a minimal test case reproducing this?

/peter

Sent from my phone, please excuse typos and autocorrection.
On Dec 2, 2011 9:12 PM, Frank fr...@studyblue.com wrote:

 Thanks for the reply.

 I *think* that what I need is to do is this:

 Relationship relationship = relationshipIndex.get(signature, signature,
 lastNode, null).getSingle();

 If I understand the documentation correctly, this should return only the
 relationships attached to the node lastNode that have the value I'm
 asking for.

 Unfortunately, my attempt to use this function results in the following
 exception:

 java.lang.UnsupportedOperationException
at
 org.neo4j.rest.graphdb.index.RestRelationshipIndex.get(RestRelationshipIndex.java:42)

 I'm kind of stuck at this point. Any ideas?

 Frank

 On Dec 2, 2011, at 1:59 PM, Peter Neubauer [via Neo4j Community
 Discussions] wrote:

  Frank,
  Either you could put just some of the rels into the index, or maybe have
 an
  additional property in the index for the direction?
 
  /peter
 
  Sent from my phone, please excuse typos and autocorrection.
  On Dec 2, 2011 8:28 PM, Frank [hidden email] wrote:
 
   I'm having some trouble understanding relationship indexes.
  
   I plan to have nodes with many (hundreds, sometimes thousands) of
   relationships to other nodes.
  
   Give node N, I want to be able to quickly locate one of those
 relationships
   given a key. I want to consider only the outgoing relationships of that
   node, not all nodes.
  
   Can this be accomplished? The problem I'm seeing is that when I try to
 look
   up a relationship from a RelationshipIndex, I don't see how to limit
 that
   lookup to just the outgoing relationships of one node.
  
   --
   View this message in context:
  
 http://neo4j-community-discussions.438527.n3.nabble.com/Relationship-indexes-tp3555465p3555465.html
   Sent from the Neo4j Community Discussions mailing list archive at
   Nabble.com.
   ___
   Neo4j mailing list
   [hidden email]
   https://lists.neo4j.org/mailman/listinfo/user
  
  ___
  Neo4j mailing list
  [hidden email]
  https://lists.neo4j.org/mailman/listinfo/user
 
 
  If you reply to this email, your message will be added to the discussion
 below:
 
 http://neo4j-community-discussions.438527.n3.nabble.com/Relationship-indexes-tp3555465p323.html
  To unsubscribe from Relationship indexes, click here.
  NAML



 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/Relationship-indexes-tp3555465p347.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] Relationship indexes

2011-12-04 Thread Frank
Peter:

The function I'm calling isn't implemented. I found it in the source code:

public class RestRelationshipIndex extends RestIndexRelationship
implements RelationshipIndex {
public RestRelationshipIndex( RestRequest restRequest, String
indexName, RestAPI restApi ) {
super( restRequest, indexName, restApi );
}

public ClassRelationship getEntityType() {
return Relationship.class;
}

public org.neo4j.graphdb.index.IndexHitsRelationship get( String s,
Object o, Node node, Node node1 ) {
throw new UnsupportedOperationException();
}

public org.neo4j.graphdb.index.IndexHitsRelationship query( String s,
Object o, Node node, Node node1 ) {
throw new UnsupportedOperationException();
}

public org.neo4j.graphdb.index.IndexHitsRelationship query( Object o,
Node node, Node node1 ) {
throw new UnsupportedOperationException();
}

@Override
public boolean isWriteable() {
return true;
}
}

On Sun, Dec 4, 2011 at 9:46 AM, Peter Neubauer [via Neo4j Community
Discussions] ml-node+s438527n3559286...@n3.nabble.com wrote:

 Frank,
 Do you have a minimal test case reproducing this?

 /peter

 Sent from my phone, please excuse typos and autocorrection.
 On Dec 2, 2011 9:12 PM, Frank [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3559286i=0
 wrote:

  Thanks for the reply.
 
  I *think* that what I need is to do is this:
 
  Relationship relationship = relationshipIndex.get(signature,
 signature,
  lastNode, null).getSingle();
 
  If I understand the documentation correctly, this should return only the
  relationships attached to the node lastNode that have the value I'm
  asking for.
 
  Unfortunately, my attempt to use this function results in the following
  exception:
 
  java.lang.UnsupportedOperationException
 at
 
 org.neo4j.rest.graphdb.index.RestRelationshipIndex.get(RestRelationshipIndex.java:42)

 
  I'm kind of stuck at this point. Any ideas?
 
  Frank
 
  On Dec 2, 2011, at 1:59 PM, Peter Neubauer [via Neo4j Community
  Discussions] wrote:
 
   Frank,
   Either you could put just some of the rels into the index, or maybe
 have
  an
   additional property in the index for the direction?
  
   /peter
  
   Sent from my phone, please excuse typos and autocorrection.
   On Dec 2, 2011 8:28 PM, Frank [hidden email] wrote:
  
I'm having some trouble understanding relationship indexes.
   
I plan to have nodes with many (hundreds, sometimes thousands) of
relationships to other nodes.
   
Give node N, I want to be able to quickly locate one of those
  relationships
given a key. I want to consider only the outgoing relationships of
 that
node, not all nodes.
   
Can this be accomplished? The problem I'm seeing is that when I try
 to
  look
up a relationship from a RelationshipIndex, I don't see how to limit
  that
lookup to just the outgoing relationships of one node.
   
--
View this message in context:
   
 
 http://neo4j-community-discussions.438527.n3.nabble.com/Relationship-indexes-tp3555465p3555465.html
Sent from the Neo4j Community Discussions mailing list archive at
Nabble.com.
___
Neo4j mailing list
[hidden email]
https://lists.neo4j.org/mailman/listinfo/user
   
   ___
   Neo4j mailing list
   [hidden email]
   https://lists.neo4j.org/mailman/listinfo/user
  
  
   If you reply to this email, your message will be added to the
 discussion
  below:
  
 
 http://neo4j-community-discussions.438527.n3.nabble.com/Relationship-indexes-tp3555465p323.html
   To unsubscribe from Relationship indexes, click here.
   NAML
 
 
 
  --
  View this message in context:
 
 http://neo4j-community-discussions.438527.n3.nabble.com/Relationship-indexes-tp3555465p347.html

  Sent from the Neo4j Community Discussions mailing list archive at
  Nabble.com.
  ___
  Neo4j mailing list
  [hidden email] http://user/SendEmail.jtp?type=nodenode=3559286i=1
  https://lists.neo4j.org/mailman/listinfo/user
 
 ___
 Neo4j mailing list
 [hidden email] http://user/SendEmail.jtp?type=nodenode=3559286i=2
 https://lists.neo4j.org/mailman/listinfo/user


 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://neo4j-community-discussions.438527.n3.nabble.com/Relationship-indexes-tp3555465p3559286.html
  To unsubscribe from Relationship indexes, click 
 herehttp://neo4j-community-discussions.438527.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3555465code=ZnJhbmtAc3R1ZHlibHVlLmNvbXwzNTU1NDY1fDE1MDQ4NTI2NjA=
 .
 

Re: [Neo4j] Relationship indexes

2011-12-04 Thread Michael Hunger
Ok, thanks for pointing that out, I was not aware that it was missing.

Will add the implementation.

Michael

Am 04.12.2011 um 16:57 schrieb Frank:

 Peter:
 
 The function I'm calling isn't implemented. I found it in the source code:
 
 public class RestRelationshipIndex extends RestIndexRelationship
 implements RelationshipIndex {
public RestRelationshipIndex( RestRequest restRequest, String
 indexName, RestAPI restApi ) {
super( restRequest, indexName, restApi );
}
 
public ClassRelationship getEntityType() {
return Relationship.class;
}
 
public org.neo4j.graphdb.index.IndexHitsRelationship get( String s,
 Object o, Node node, Node node1 ) {
throw new UnsupportedOperationException();
}
 
public org.neo4j.graphdb.index.IndexHitsRelationship query( String s,
 Object o, Node node, Node node1 ) {
throw new UnsupportedOperationException();
}
 
public org.neo4j.graphdb.index.IndexHitsRelationship query( Object o,
 Node node, Node node1 ) {
throw new UnsupportedOperationException();
}
 
@Override
public boolean isWriteable() {
return true;
}
 }
 
 On Sun, Dec 4, 2011 at 9:46 AM, Peter Neubauer [via Neo4j Community
 Discussions] ml-node+s438527n3559286...@n3.nabble.com wrote:
 
 Frank,
 Do you have a minimal test case reproducing this?
 
 /peter
 
 Sent from my phone, please excuse typos and autocorrection.
 On Dec 2, 2011 9:12 PM, Frank [hidden 
 email]http://user/SendEmail.jtp?type=nodenode=3559286i=0
 wrote:
 
 Thanks for the reply.
 
 I *think* that what I need is to do is this:
 
 Relationship relationship = relationshipIndex.get(signature,
 signature,
 lastNode, null).getSingle();
 
 If I understand the documentation correctly, this should return only the
 relationships attached to the node lastNode that have the value I'm
 asking for.
 
 Unfortunately, my attempt to use this function results in the following
 exception:
 
 java.lang.UnsupportedOperationException
   at
 
 org.neo4j.rest.graphdb.index.RestRelationshipIndex.get(RestRelationshipIndex.java:42)
 
 
 I'm kind of stuck at this point. Any ideas?
 
 Frank
 
 On Dec 2, 2011, at 1:59 PM, Peter Neubauer [via Neo4j Community
 Discussions] wrote:
 
 Frank,
 Either you could put just some of the rels into the index, or maybe
 have
 an
 additional property in the index for the direction?
 
 /peter
 
 Sent from my phone, please excuse typos and autocorrection.
 On Dec 2, 2011 8:28 PM, Frank [hidden email] wrote:
 
 I'm having some trouble understanding relationship indexes.
 
 I plan to have nodes with many (hundreds, sometimes thousands) of
 relationships to other nodes.
 
 Give node N, I want to be able to quickly locate one of those
 relationships
 given a key. I want to consider only the outgoing relationships of
 that
 node, not all nodes.
 
 Can this be accomplished? The problem I'm seeing is that when I try
 to
 look
 up a relationship from a RelationshipIndex, I don't see how to limit
 that
 lookup to just the outgoing relationships of one node.
 
 --
 View this message in context:
 
 
 http://neo4j-community-discussions.438527.n3.nabble.com/Relationship-indexes-tp3555465p3555465.html
 Sent from the Neo4j Community Discussions mailing list archive at
 Nabble.com.
 ___
 Neo4j mailing list
 [hidden email]
 https://lists.neo4j.org/mailman/listinfo/user
 
 ___
 Neo4j mailing list
 [hidden email]
 https://lists.neo4j.org/mailman/listinfo/user
 
 
 If you reply to this email, your message will be added to the
 discussion
 below:
 
 
 http://neo4j-community-discussions.438527.n3.nabble.com/Relationship-indexes-tp3555465p323.html
 To unsubscribe from Relationship indexes, click here.
 NAML
 
 
 
 --
 View this message in context:
 
 http://neo4j-community-discussions.438527.n3.nabble.com/Relationship-indexes-tp3555465p347.html
 
 Sent from the Neo4j Community Discussions mailing list archive at
 Nabble.com.
 ___
 Neo4j mailing list
 [hidden email] http://user/SendEmail.jtp?type=nodenode=3559286i=1
 https://lists.neo4j.org/mailman/listinfo/user
 
 ___
 Neo4j mailing list
 [hidden email] http://user/SendEmail.jtp?type=nodenode=3559286i=2
 https://lists.neo4j.org/mailman/listinfo/user
 
 
 --
 If you reply to this email, your message will be added to the discussion
 below:
 
 http://neo4j-community-discussions.438527.n3.nabble.com/Relationship-indexes-tp3555465p3559286.html
 To unsubscribe from Relationship indexes, click 
 herehttp://neo4j-community-discussions.438527.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3555465code=ZnJhbmtAc3R1ZHlibHVlLmNvbXwzNTU1NDY1fDE1MDQ4NTI2NjA=
 .
 

[Neo4j] Relationship indexes

2011-12-02 Thread Frank
I'm having some trouble understanding relationship indexes.

I plan to have nodes with many (hundreds, sometimes thousands) of
relationships to other nodes.

Give node N, I want to be able to quickly locate one of those relationships
given a key. I want to consider only the outgoing relationships of that
node, not all nodes.

Can this be accomplished? The problem I'm seeing is that when I try to look
up a relationship from a RelationshipIndex, I don't see how to limit that
lookup to just the outgoing relationships of one node.

--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Relationship-indexes-tp3555465p3555465.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] Relationship indexes

2011-12-02 Thread Peter Neubauer
Frank,
Either you could put just some of the rels into the index, or maybe have an
additional property in the index for the direction?

/peter

Sent from my phone, please excuse typos and autocorrection.
On Dec 2, 2011 8:28 PM, Frank fr...@studyblue.com wrote:

 I'm having some trouble understanding relationship indexes.

 I plan to have nodes with many (hundreds, sometimes thousands) of
 relationships to other nodes.

 Give node N, I want to be able to quickly locate one of those relationships
 given a key. I want to consider only the outgoing relationships of that
 node, not all nodes.

 Can this be accomplished? The problem I'm seeing is that when I try to look
 up a relationship from a RelationshipIndex, I don't see how to limit that
 lookup to just the outgoing relationships of one node.

 --
 View this message in context:
 http://neo4j-community-discussions.438527.n3.nabble.com/Relationship-indexes-tp3555465p3555465.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] Relationship indexes

2011-12-02 Thread Frank
Thanks for the reply.

I *think* that what I need is to do is this:

Relationship relationship = relationshipIndex.get(signature, signature, 
lastNode, null).getSingle();

If I understand the documentation correctly, this should return only the 
relationships attached to the node lastNode that have the value I'm asking 
for.

Unfortunately, my attempt to use this function results in the following 
exception:

java.lang.UnsupportedOperationException
at 
org.neo4j.rest.graphdb.index.RestRelationshipIndex.get(RestRelationshipIndex.java:42)

I'm kind of stuck at this point. Any ideas?

Frank

On Dec 2, 2011, at 1:59 PM, Peter Neubauer [via Neo4j Community Discussions] 
wrote:

 Frank, 
 Either you could put just some of the rels into the index, or maybe have an 
 additional property in the index for the direction? 
 
 /peter 
 
 Sent from my phone, please excuse typos and autocorrection. 
 On Dec 2, 2011 8:28 PM, Frank [hidden email] wrote: 
 
  I'm having some trouble understanding relationship indexes. 
  
  I plan to have nodes with many (hundreds, sometimes thousands) of 
  relationships to other nodes. 
  
  Give node N, I want to be able to quickly locate one of those relationships 
  given a key. I want to consider only the outgoing relationships of that 
  node, not all nodes. 
  
  Can this be accomplished? The problem I'm seeing is that when I try to look 
  up a relationship from a RelationshipIndex, I don't see how to limit that 
  lookup to just the outgoing relationships of one node. 
  
  -- 
  View this message in context: 
  http://neo4j-community-discussions.438527.n3.nabble.com/Relationship-indexes-tp3555465p3555465.html
  Sent from the Neo4j Community Discussions mailing list archive at 
  Nabble.com. 
  ___ 
  Neo4j mailing list 
  [hidden email] 
  https://lists.neo4j.org/mailman/listinfo/user
 
 ___ 
 Neo4j mailing list 
 [hidden email] 
 https://lists.neo4j.org/mailman/listinfo/user
 
 
 If you reply to this email, your message will be added to the discussion 
 below:
 http://neo4j-community-discussions.438527.n3.nabble.com/Relationship-indexes-tp3555465p323.html
 To unsubscribe from Relationship indexes, click here.
 NAML



--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Relationship-indexes-tp3555465p347.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