Search in sources :

Example 11 with IndexConfigStore

use of org.neo4j.kernel.impl.index.IndexConfigStore in project neo4j by neo4j.

the class TestMigration method removeProvidersFromIndexDbFile.

private void removeProvidersFromIndexDbFile(File storeDir) {
    IndexConfigStore indexStore = new IndexConfigStore(storeDir, fileSystemRule.get());
    for (Class<? extends PropertyContainer> cls : new Class[] { Node.class, Relationship.class }) {
        for (String name : indexStore.getNames(cls)) {
            Map<String, String> config = indexStore.get(cls, name);
            config = new HashMap<>(config);
            config.remove(IndexManager.PROVIDER);
            indexStore.set(Node.class, name, config);
        }
    }
}
Also used : Node(org.neo4j.graphdb.Node) Relationship(org.neo4j.graphdb.Relationship) IndexConfigStore(org.neo4j.kernel.impl.index.IndexConfigStore)

Example 12 with IndexConfigStore

use of org.neo4j.kernel.impl.index.IndexConfigStore in project neo4j by neo4j.

the class WritableIndexReferenceFactoryTest method setupIndexInfrastructure.

private void setupIndexInfrastructure() throws IOException {
    File storeDir = getStoreDir();
    indexStore = new IndexConfigStore(storeDir, fileSystemRule.get());
    indexStore.set(Node.class, INDEX_NAME, MapUtil.stringMap(IndexManager.PROVIDER, "lucene", "type", "fulltext"));
}
Also used : IndexConfigStore(org.neo4j.kernel.impl.index.IndexConfigStore) File(java.io.File)

Aggregations

IndexConfigStore (org.neo4j.kernel.impl.index.IndexConfigStore)12 Test (org.junit.Test)5 File (java.io.File)4 Matchers.anyString (org.mockito.Matchers.anyString)4 Node (org.neo4j.graphdb.Node)3 Relationship (org.neo4j.graphdb.Relationship)3 IndexDefineCommand (org.neo4j.kernel.impl.index.IndexDefineCommand)3 SynchronizedArrayIdOrderingQueue (org.neo4j.kernel.impl.util.SynchronizedArrayIdOrderingQueue)3 Config (org.neo4j.kernel.configuration.Config)2 LabelScanStoreProvider (org.neo4j.kernel.impl.api.scan.LabelScanStoreProvider)2 FakeCommitment (org.neo4j.kernel.impl.transaction.log.FakeCommitment)2 TransactionIdStore (org.neo4j.kernel.impl.transaction.log.TransactionIdStore)2 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1 Arrays (java.util.Arrays)1 Collections.singletonMap (java.util.Collections.singletonMap)1 HashSet (java.util.HashSet)1 Map (java.util.Map)1 Set (java.util.Set)1 AtomicLong (java.util.concurrent.atomic.AtomicLong)1