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 RestIndex
> implements RelationshipIndex {
>public RestRelationshipIndex( RestRequest restRequest, String
> indexName, RestAPI restApi ) {
>super( restRequest, indexName, restApi );
>}
> 
>public Class getEntityType() {
>return Relationship.class;
>}
> 
>public org.neo4j.graphdb.index.IndexHits get( String s,
> Object o, Node node, Node node1 ) {
>throw new UnsupportedOperationException();
>}
> 
>public org.neo4j.graphdb.index.IndexHits query( String s,
> Object o, Node node, Node node1 ) {
>throw new UnsupportedOperationException();
>}
> 
>public org.neo4j.graphdb.index.IndexHits 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]  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]>
>> 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] 
>>> 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-tp3555465p3559286.html
>> To unsubscribe from Rel

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 RestIndex
implements RelationshipIndex {
public RestRelationshipIndex( RestRequest restRequest, String
indexName, RestAPI restApi ) {
super( restRequest, indexName, restApi );
}

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

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

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

public org.neo4j.graphdb.index.IndexHits 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]  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]>
> 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] 
> > 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-tp3555465p3559286.html
>  To unsubscribe from Relationship indexes, click 
> here

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"  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-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


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"  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


[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