Skip to content

Commit

Permalink
Rename bloom_analyzer setting to bloom_default_analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvest committed Oct 6, 2017
1 parent c417a8f commit 5e4f8e5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
Expand Up @@ -32,8 +32,6 @@
import static org.neo4j.kernel.configuration.Settings.BOOLEAN;
import static org.neo4j.kernel.configuration.Settings.FALSE;
import static org.neo4j.kernel.configuration.Settings.STRING;
import static org.neo4j.kernel.configuration.Settings.STRING_LIST;
import static org.neo4j.kernel.configuration.Settings.buildSetting;
import static org.neo4j.kernel.configuration.Settings.illegalValueMessage;
import static org.neo4j.kernel.configuration.Settings.matchesAny;
import static org.neo4j.kernel.configuration.Settings.setting;
Expand All @@ -55,6 +53,6 @@ public class BloomFulltextConfig implements LoadableConfig
@Description( "Define the analyzer to use for the bloom index. Expects the fully qualified classname of the " +
"analyzer to use" )
@Internal
static final Setting<String> bloom_analyzer = setting( "unsupported.dbms.bloom_analyzer", STRING,
static final Setting<String> bloom_default_analyzer = setting( "unsupported.dbms.bloom_default_analyzer", STRING,
"org.apache.lucene.analysis.standard.StandardAnalyzer" );
}
Expand Up @@ -76,7 +76,7 @@ public void start() throws IOException, KernelException
{
if ( config.get( BloomFulltextConfig.bloom_enabled ) )
{
String analyzer = config.get( BloomFulltextConfig.bloom_analyzer );
String analyzer = config.get( BloomFulltextConfig.bloom_default_analyzer );

Log log = logService.getInternalLog( FulltextProvider.class );
provider = new FulltextProvider( db, log, availabilityGuard, scheduler, transactionIdStore.get(),
Expand Down
Expand Up @@ -200,7 +200,7 @@ public void matchAllQueryShouldMatchAll() throws Exception
@Test
public void shouldBeAbleToConfigureAnalyzer() throws Exception
{
builder.setConfig( BloomFulltextConfig.bloom_analyzer, "org.apache.lucene.analysis.sv.SwedishAnalyzer" );
builder.setConfig( BloomFulltextConfig.bloom_default_analyzer, "org.apache.lucene.analysis.sv.SwedishAnalyzer" );
db = getDb();
db.execute( String.format( SET_NODE_KEYS, "\"prop\"" ) );
try ( Transaction transaction = db.beginTx() )
Expand Down Expand Up @@ -242,7 +242,7 @@ public void shouldPopulateIndexWithExistingDataOnIndexCreate() throws Exception
assertFalse( result.hasNext() );
db.shutdown();

builder.setConfig( BloomFulltextConfig.bloom_analyzer, "org.apache.lucene.analysis.da.DanishAnalyzer" );
builder.setConfig( BloomFulltextConfig.bloom_default_analyzer, "org.apache.lucene.analysis.da.DanishAnalyzer" );
db = getDb();
db.execute( String.format( SET_NODE_KEYS, "\"prop\"" ) );

Expand Down Expand Up @@ -469,7 +469,7 @@ public void shouldReindexNodesWhenAnalyzerIsChanged() throws Exception
String ENGLISH = EnglishAnalyzer.class.getCanonicalName();
String SWEDISH = SwedishAnalyzer.class.getCanonicalName();

builder.setConfig( BloomFulltextConfig.bloom_analyzer, ENGLISH );
builder.setConfig( BloomFulltextConfig.bloom_default_analyzer, ENGLISH );

db = getDb();
db.execute( String.format( SET_NODE_KEYS, "\"prop\"" ) );
Expand All @@ -493,7 +493,7 @@ public void shouldReindexNodesWhenAnalyzerIsChanged() throws Exception
}

db.shutdown();
builder.setConfig( BloomFulltextConfig.bloom_analyzer, SWEDISH );
builder.setConfig( BloomFulltextConfig.bloom_default_analyzer, SWEDISH );
db = getDb();
db.execute( AWAIT_POPULATION ).close();

Expand Down

0 comments on commit 5e4f8e5

Please sign in to comment.