Core: still don't load bloom filters, even when Directory instance doesn't have a codecService
This commit is contained in:
parent
a783d342d2
commit
7a22bfba3c
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue