Package org.neo4j.unsafe.batchinsert

Examples of org.neo4j.unsafe.batchinsert.BatchInserterIndex


        final boolean luceneOnlyIndex = config.isCachedIndexDisabled();
        indexProvider = createIndexProvider(luceneOnlyIndex);
        Collection<IndexInfo> indexInfos = config.getIndexInfos();
        if (indexInfos!=null) {
            for (IndexInfo indexInfo : indexInfos) {
                BatchInserterIndex index = indexInfo.isNodeIndex() ? nodeIndexFor(indexInfo.indexName, indexInfo.indexType) : relationshipIndexFor(indexInfo.indexName, indexInfo.indexType);
                indexes.put(indexInfo.indexName, index);
            }
        }

        report = createReport();
View Full Code Here


                db.createNode(id, data.getProperties());
            } else {
                id = db.createNode(data.getProperties());
            }
            for (Map.Entry<String, Map<String, Object>> entry : data.getIndexData().entrySet()) {
                final BatchInserterIndex index = indexFor(entry.getKey());
                if (index==null)
                    throw new IllegalStateException("Index "+entry.getKey()+" not configured.");
                index.add(id, entry.getValue());
            }
            report.dots();
        }
        report.finishImport("Nodes");
    }
View Full Code Here

    }

    public void indexNodeUsingBatchIndexer(BatchInserterIndexProvider indexProvider, EntityMetadata entityMetadata,
            long nodeId, Map<String, Object> nodeProperties, boolean nodeAutoIndexingEnabled)
    {
        BatchInserterIndex nodeIndex = null;

        if (!nodeAutoIndexingEnabled && entityMetadata.isIndexable())
        {
            nodeIndex = indexProvider.nodeIndex(entityMetadata.getIndexName(), MapUtil.stringMap("type", "exact"));

        }
        else
        {
            nodeIndex = indexProvider.nodeIndex("node_auto_index", MapUtil.stringMap("type", "exact"));
        }

        if (nodeIndex != null)
            nodeIndex.add(nodeId, nodeProperties);
    }
View Full Code Here

    public void indexRelationshipUsingBatchIndexer(BatchInserterIndexProvider indexProvider,
            EntityMetadata entityMetadata, long relationshipId, Map<String, Object> relationshipProperties,
            boolean relationshipAutoIndexingEnabled)
    {
        BatchInserterIndex relationshipIndex = null;

        if (!relationshipAutoIndexingEnabled && entityMetadata.isIndexable())
        {
            relationshipIndex = indexProvider.relationshipIndex(entityMetadata.getIndexName(),
                    MapUtil.stringMap("type", "exact"));
        }
        else
        {
            relationshipIndex = indexProvider.relationshipIndex("relationship_auto_index",
                    MapUtil.stringMap("type", "exact"));
        }

        if (relationshipIndex != null)
            relationshipIndex.add(relationshipId, relationshipProperties);
    }
View Full Code Here

TOP

Related Classes of org.neo4j.unsafe.batchinsert.BatchInserterIndex

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.