Core: still don't load bloom filters, even when Directory instance doesn't have a codecService

This commit is contained in:
Michael McCandless 2014-11-11 16:56:20 -05:00 committed by mikemccand
parent a783d342d2
commit 7a22bfba3c
2 changed files with 2 additions and 2 deletions

View File

@ -164,7 +164,7 @@ public final class BloomFilterPostingsFormat extends PostingsFormat {
.readString();
int numBlooms = bloomIn.readInt();
boolean load = true;
boolean load = false;
Store.StoreDirectory storeDir = DirectoryUtils.getStoreDirectory(state.directory);
if (storeDir != null && storeDir.codecService() != null) {
load = storeDir.codecService().isLoadBloomFilter();

View File

@ -75,7 +75,7 @@ public class DefaultPostingsFormatTests extends ElasticsearchTestCase {
assertThat(terms.size(), equalTo(1l));
assertThat(terms, not(instanceOf(BloomFilterPostingsFormat.BloomFilteredTerms.class)));
assertThat(uidTerms, instanceOf(BloomFilterPostingsFormat.BloomFilteredTerms.class));
assertThat(uidTerms, not(instanceOf(BloomFilterPostingsFormat.BloomFilteredTerms.class)));
reader.close();
writer.close();