public String removeNodeIndexConfiguration( String indexName, String key ) throws ExplicitIndexNotFoundKernelException { assertLegalConfigKey( key ); Map<String, String> config = new HashMap<>( getNodeIndexConfiguration( indexName ) ); String value = config.remove( key ); if ( value != null ) { indexStore.set( Node.class, indexName, config ); } return value; }
public String setNodeIndexConfiguration( String indexName, String key, String value ) throws ExplicitIndexNotFoundKernelException { assertLegalConfigKey( key ); Map<String, String> config = new HashMap<>( getNodeIndexConfiguration( indexName ) ); String oldValue = config.put( key, value ); indexStore.set( Node.class, indexName, config ); return oldValue; }
public String setRelationshipIndexConfiguration( String indexName, String key, String value ) throws ExplicitIndexNotFoundKernelException { assertLegalConfigKey( key ); Map<String, String> config = new HashMap<>( getRelationshipIndexConfiguration( indexName ) ); String oldValue = config.put( key, value ); indexStore.set( Relationship.class, indexName, config ); return oldValue; }
public String removeRelationshipIndexConfiguration( String indexName, String key ) throws ExplicitIndexNotFoundKernelException { assertLegalConfigKey( key ); Map<String, String> config = new HashMap<>( getRelationshipIndexConfiguration( indexName ) ); String value = config.remove( key ); if ( value != null ) { indexStore.set( Relationship.class, indexName, config ); } return value; }
private void addIndex( String name ) { indexStore.set( Node.class, name, stringMap( IndexManager.PROVIDER, "lucene", "type", "fulltext" ) ); }
private void removeProvidersFromIndexDbFile( DatabaseLayout databaseLayout ) { IndexConfigStore indexStore = new IndexConfigStore( databaseLayout, 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 ); } } } }
private IndexConfigStore newIndexConfigStore( MutableObjectIntMap<String> names, String providerName ) { EphemeralFileSystemAbstraction fileSystem = fs.get(); IndexConfigStore store = life.add( new IndexConfigStore( testDirectory.databaseLayout(), fileSystem ) ); names.forEachKey( name -> { store.set( Node.class, name, stringMap( IndexManager.PROVIDER, providerName ) ); store.set( Relationship.class, name, stringMap( IndexManager.PROVIDER, providerName ) ); } ); return store; } }
private void setupIndexInfrastructure() { indexStore = new IndexConfigStore( testDirectory.databaseLayout(), fileSystemRule.get() ); indexStore.set( Node.class, INDEX_NAME, MapUtil.stringMap( IndexManager.PROVIDER, "lucene", "type", "fulltext" ) ); } }
DatabaseLayout databaseLayout = testDirectory.databaseLayout(); IndexConfigStore configStore = new IndexConfigStore( databaseLayout, fs ); configStore.set( Node.class, indexName, EXACT_CONFIG ); try ( Lifespan lifespan = new Lifespan() )
private void setupIndexInfrastructure() throws Exception { DatabaseLayout databaseLayout = testDirectory.databaseLayout(); indexStore = new IndexConfigStore( databaseLayout, fileSystemRule.get() ); indexStore.set( Node.class, INDEX_NAME, MapUtil.stringMap( IndexManager.PROVIDER, "lucene", "type", "fulltext" ) ); LuceneDataSource luceneDataSource = new LuceneDataSource( databaseLayout, Config.defaults(), indexStore, fileSystemRule.get(), OperationalMode.single ); try { luceneDataSource.init(); luceneDataSource.getIndexSearcher( indexIdentifier ); } finally { luceneDataSource.shutdown(); } }
public String removeRelationshipIndexConfiguration( String indexName, String key ) throws ExplicitIndexNotFoundKernelException { assertLegalConfigKey( key ); Map<String, String> config = new HashMap<>( getRelationshipIndexConfiguration( indexName ) ); String value = config.remove( key ); if ( value != null ) { indexStore.set( Relationship.class, indexName, config ); } return value; }
public String setNodeIndexConfiguration( String indexName, String key, String value ) throws ExplicitIndexNotFoundKernelException { assertLegalConfigKey( key ); Map<String, String> config = new HashMap<>( getNodeIndexConfiguration( indexName ) ); String oldValue = config.put( key, value ); indexStore.set( Node.class, indexName, config ); return oldValue; }
public String setRelationshipIndexConfiguration( String indexName, String key, String value ) throws ExplicitIndexNotFoundKernelException { assertLegalConfigKey( key ); Map<String, String> config = new HashMap<>( getRelationshipIndexConfiguration( indexName ) ); String oldValue = config.put( key, value ); indexStore.set( Relationship.class, indexName, config ); return oldValue; }
public String removeNodeIndexConfiguration( String indexName, String key ) throws ExplicitIndexNotFoundKernelException { assertLegalConfigKey( key ); Map<String, String> config = new HashMap<>( getNodeIndexConfiguration( indexName ) ); String value = config.remove( key ); if ( value != null ) { indexStore.set( Node.class, indexName, config ); } return value; }