Package org.neo4j.graphdb.index

Examples of org.neo4j.graphdb.index.RelationshipIndex


    public void makeSureYouCanRemoveFromRelationshipIndex()
    {
        Node n1 = graphDb.createNode();
        Node n2 = graphDb.createNode();
        Relationship r = n1.createRelationshipTo( n2, DynamicRelationshipType.withName( "foo" ) );
        RelationshipIndex index = graphDb.index().forRelationships( "rel-index" );
        String key = "bar";
        index.remove( r, key, "value" );
        index.add( r, key, "otherValue" );
        for ( int i = 0; i < 2; i++ )
        {
            assertThat( index.get( key, "value" ), isEmpty() );
            assertThat( index.get( key, "otherValue" ), contains( r ) );
            restartTx();
        }
    }
View Full Code Here

TOP

Related Classes of org.neo4j.graphdb.index.RelationshipIndex

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.