Examples of forNodes()


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

    }

    private void removeFromIndexes(Node node) {
        IndexManager indexManager = getIndexManager();
        for (String indexName : indexManager.nodeIndexNames()) {
            indexManager.forNodes(indexName).remove(node);
        }
    }

    private void removeFromIndexes(Relationship relationship) {
        IndexManager indexManager = getIndexManager();
View Full Code Here

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

    }

    @Override
    public <T extends PropertyContainer> Index<T> getIndex(String indexName) {
        IndexManager indexManager = delegate.index();
        if (indexManager.existsForNodes(indexName)) return (Index<T>) indexManager.forNodes(indexName);
        if (indexManager.existsForRelationships(indexName)) return (Index<T>) indexManager.forRelationships(indexName);
        throw new IllegalArgumentException("Index "+indexName+" does not exist.");
    }

    // TODO handle existing indexes
View Full Code Here

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

    @Override
    public <T extends PropertyContainer> Index<T> createIndex(Class<T> type, String indexName, boolean fullText) {
        IndexManager indexManager = delegate.index();
        if (isNode(type)) {
            if (indexManager.existsForNodes(indexName))
                return (Index<T>) checkAndGetExistingIndex(indexName, fullText, indexManager.forNodes(indexName));
            return (Index<T>) indexManager.forNodes(indexName, indexConfigFor(fullText));
        } else {
            if (indexManager.existsForRelationships(indexName))
                return (Index<T>) checkAndGetExistingIndex(indexName, fullText, indexManager.forRelationships(indexName));
            return (Index<T>) indexManager.forRelationships(indexName, indexConfigFor(fullText));
View Full Code Here

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

    public <T extends PropertyContainer> Index<T> createIndex(Class<T> type, String indexName, boolean fullText) {
        IndexManager indexManager = delegate.index();
        if (isNode(type)) {
            if (indexManager.existsForNodes(indexName))
                return (Index<T>) checkAndGetExistingIndex(indexName, fullText, indexManager.forNodes(indexName));
            return (Index<T>) indexManager.forNodes(indexName, indexConfigFor(fullText));
        } else {
            if (indexManager.existsForRelationships(indexName))
                return (Index<T>) checkAndGetExistingIndex(indexName, fullText, indexManager.forRelationships(indexName));
            return (Index<T>) indexManager.forRelationships(indexName, indexConfigFor(fullText));
        }
View Full Code Here

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

    }

    private static void clearIndex(GraphDatabaseService gds) {
        IndexManager indexManager = gds.index();
        for (String ix : indexManager.nodeIndexNames()) {
            indexManager.forNodes(ix).delete();
        }
        for (String ix : indexManager.relationshipIndexNames()) {
            indexManager.forRelationships(ix).delete();
        }
    }
View Full Code Here

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

    private void clearIndex(Map<String, Object> result) {
        IndexManager indexManager = graph.index();
        result.put("node-indexes", Arrays.asList(indexManager.nodeIndexNames()));
        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

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

    public void testLoadIndex() {
        Map<String, String> config = SpatialIndexProvider.SIMPLE_POINT_CONFIG;
        try (Transaction tx = db.beginTx()) {
            IndexManager indexMan = db.index();
            Index<Node> index;
            index = indexMan.forNodes("layer1", config);
            assertNotNull(index);

            //Load the an existing index again
            index = indexMan.forNodes("layer1", config);
            assertNotNull(index);
View Full Code Here

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

            Index<Node> index;
            index = indexMan.forNodes("layer1", config);
            assertNotNull(index);

            //Load the an existing index again
            index = indexMan.forNodes("layer1", config);
            assertNotNull(index);

            //Try a different config
            Map<String, String> config2 = SpatialIndexProvider.SIMPLE_WKT_CONFIG;
            index = indexMan.forNodes("layer2", config2);
View Full Code Here

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

            index = indexMan.forNodes("layer1", config);
            assertNotNull(index);

            //Try a different config
            Map<String, String> config2 = SpatialIndexProvider.SIMPLE_WKT_CONFIG;
            index = indexMan.forNodes("layer2", config2);
            assertNotNull(index);

            //Load the index again
            index = indexMan.forNodes("layer2", config2);
            assertNotNull(index);
View Full Code Here

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

            Map<String, String> config2 = SpatialIndexProvider.SIMPLE_WKT_CONFIG;
            index = indexMan.forNodes("layer2", config2);
            assertNotNull(index);

            //Load the index again
            index = indexMan.forNodes("layer2", config2);
            assertNotNull(index);

            //Try loading the same index with a different config
            boolean exceptionThrown = false;
            try {
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.