Package org.neo4j.graphdb.index

Examples of org.neo4j.graphdb.index.IndexManager.forRelationships()


                    return (Index<T>) checkAndGetExistingIndex(indexName, indexType, indexManager.forNodes(indexName));
                Index<Node> index = indexManager.forNodes(indexName, indexConfigFor(indexType));
                return (Index<T>) index;
            } else {
                if (indexManager.existsForRelationships(indexName))
                    return (Index<T>) checkAndGetExistingIndex(indexName, indexType, indexManager.forRelationships(indexName));
                return (Index<T>) indexManager.forRelationships(indexName, indexConfigFor(indexType));
            }
        } finally {
            tx.success();tx.close();
        }
View Full Code Here


                Index<Node> index = indexManager.forNodes(indexName, indexConfigFor(indexType));
                return (Index<T>) index;
            } else {
                if (indexManager.existsForRelationships(indexName))
                    return (Index<T>) checkAndGetExistingIndex(indexName, indexType, indexManager.forRelationships(indexName));
                return (Index<T>) indexManager.forRelationships(indexName, indexConfigFor(indexType));
            }
        } finally {
            tx.success();tx.close();
        }
    }
View Full Code Here

        result.put("relationship-indexes", Arrays.asList(indexManager.relationshipIndexNames()));
        for (String ix : indexManager.nodeIndexNames()) {
            indexManager.forNodes(ix).delete();
        }
        for (String ix : indexManager.relationshipIndexNames()) {
            indexManager.forRelationships(ix).delete();
        }
    }
}
View Full Code Here

        {
            // START SNIPPET: createIndices
            IndexManager index = graphDb.index();
            Index<Node> actors = index.forNodes( "actors" );
            Index<Node> movies = index.forNodes( "movies" );
            RelationshipIndex roles = index.forRelationships( "roles" );
            // END SNIPPET: createIndices

            // START SNIPPET: createNodes
            // Actors
            Node reeves = graphDb.createNode();
View Full Code Here

    @Test
    public void doQueriesForRelationships()
    {
        IndexManager index = graphDb.index();
        RelationshipIndex roles = index.forRelationships( "roles" );
        Index<Node> actors = graphDb.index().forNodes( "actors" );
        Index<Node> movies = index.forNodes( "movies" );

        Node reeves = actors.get( "name", "Keanu Reeves" ).getSingle();
        Node theMatrix = movies.get( "title", "The Matrix" ).getSingle();
View Full Code Here

        {
            if ( !indexManager.existsForRelationships( indexName ) )
            {
                continue;
            }
            Index<Relationship> relIndex = indexManager.forRelationships( indexName );
            IndexHits<Relationship> hits;
            switch ( search.getMode() )
            {
            case EXACT_MATCH:
                hits = relIndex.get( search.getKey(), search.getValueOrQuery() );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.