Package org.neo4j.index.impl.lucene

Examples of org.neo4j.index.impl.lucene.LuceneBatchInserterIndexProvider


    @Test
    public void batchInsert()
    {
        // START SNIPPET: batchInsert
        BatchInserter inserter = new BatchInserterImpl( "target/neo4jdb-batchinsert" );
        BatchInserterIndexProvider indexProvider = new LuceneBatchInserterIndexProvider( inserter );
        BatchInserterIndex actors = indexProvider.nodeIndex( "actors", MapUtil.stringMap( "type", "exact" ) );
        actors.setCacheCapacity( "name", 100000 );

        Map<String, Object> properties = MapUtil.map( "name", "Keanu Reeves" );
        long node = inserter.createNode( properties );
        actors.add( node, properties );

        // Make sure to shut down the index provider
        indexProvider.shutdown();
        inserter.shutdown();
        // END SNIPPET: batchInsert
    }
View Full Code Here

TOP

Related Classes of org.neo4j.index.impl.lucene.LuceneBatchInserterIndexProvider

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.