diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/TestLsmBTreeResourceFactoryProvider.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/TestLsmBTreeResourceFactoryProvider.java
index 8d37878..9a0cd5a 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/TestLsmBTreeResourceFactoryProvider.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/TestLsmBTreeResourceFactoryProvider.java
@@ -22,6 +22,7 @@
 import java.util.Map;
 
 import org.apache.asterix.common.config.DatasetConfig.DatasetType;
+import org.apache.asterix.common.config.DatasetConfig.IndexType;
 import org.apache.asterix.common.context.AsterixVirtualBufferCacheProvider;
 import org.apache.asterix.common.context.IStorageComponentProvider;
 import org.apache.asterix.external.indexing.FilesIndexDescription;
@@ -155,7 +156,8 @@
     }
 
     private static int[] getBloomFilterFields(Dataset dataset, Index index) throws AlgebricksException {
-        if (index.isPrimaryIndex()) {
+        // both the Primary index and the Primary Key index have bloom filters
+        if (index.isPrimaryIndex() || index.isPrimaryKeyIndex()) {
             return dataset.getPrimaryBloomFilterFields();
         } else if (dataset.getDatasetType() == DatasetType.EXTERNAL) {
             if (index.getIndexName().equals(IndexingConstants.getFilesIndexName(dataset.getDatasetName()))) {
@@ -163,12 +165,17 @@
             } else {
                 return new int[] { index.getKeyFieldNames().size() };
             }
+        } else if (index.getIndexType() == IndexType.BTREE || index.getIndexType() == IndexType.RTREE) {
+            // secondary btrees and rtrees do not have bloom filters
+            return null;
+        } else {
+            // inverted indexes have bloom filters on deleted-key btrees
+            int numKeys = index.getKeyFieldNames().size();
+            int[] bloomFilterKeyFields = new int[numKeys];
+            for (int i = 0; i < numKeys; i++) {
+                bloomFilterKeyFields[i] = i;
+            }
+            return bloomFilterKeyFields;
         }
-        int numKeys = index.getKeyFieldNames().size();
-        int[] bloomFilterKeyFields = new int[numKeys];
-        for (int i = 0; i < numKeys; i++) {
-            bloomFilterKeyFields[i] = i;
-        }
-        return bloomFilterKeyFields;
     }
 }
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/BTreeResourceFactoryProvider.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/BTreeResourceFactoryProvider.java
index 883da84..21fafaf6a 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/BTreeResourceFactoryProvider.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/BTreeResourceFactoryProvider.java
@@ -22,6 +22,7 @@
 import java.util.Map;
 
 import org.apache.asterix.common.config.DatasetConfig.DatasetType;
+import org.apache.asterix.common.config.DatasetConfig.IndexType;
 import org.apache.asterix.common.context.AsterixVirtualBufferCacheProvider;
 import org.apache.asterix.common.context.IStorageComponentProvider;
 import org.apache.asterix.common.exceptions.CompilationException;
@@ -194,12 +195,17 @@
             } else {
                 return new int[] { index.getKeyFieldNames().size() };
             }
+        } else if (index.getIndexType() == IndexType.BTREE || index.getIndexType() == IndexType.RTREE) {
+            // secondary btrees and rtrees do not have bloom filters
+            return null;
+        } else {
+            // inverted indexes have bloom filters on deleted-key btrees
+            int numKeys = index.getKeyFieldNames().size();
+            int[] bloomFilterKeyFields = new int[numKeys];
+            for (int i = 0; i < numKeys; i++) {
+                bloomFilterKeyFields[i] = i;
+            }
+            return bloomFilterKeyFields;
         }
-        int numKeys = index.getKeyFieldNames().size();
-        int[] bloomFilterKeyFields = new int[numKeys];
-        for (int i = 0; i < numKeys; i++) {
-            bloomFilterKeyFields[i] = i;
-        }
-        return bloomFilterKeyFields;
     }
 }
