@@ -834,12 +834,10 @@ private void runTestTypeQueryFinalization(
834834 // we should _not_ prune if any of the following:
835835 // - the query explicitly overrides the options and `prune` is set to false
836836 // - the query does not override the pruning options and:
837- // - either we are using a previous index version
838- // - or the index_options explicitly sets `prune` to false
839- boolean resultShouldNotBePruned = (
840- (queryOverridesPruningConfig && queryOverridesPruneToBeFalse ) ||
841- (queryOverridesPruningConfig == false && (useIndexVersionBeforeIndexOptions || setMapperIndexOptionsPruneToFalse ))
842- );
837+ // - either we are using a previous index version
838+ // - or the index_options explicitly sets `prune` to false
839+ boolean resultShouldNotBePruned = ((queryOverridesPruningConfig && queryOverridesPruneToBeFalse )
840+ || (queryOverridesPruningConfig == false && (useIndexVersionBeforeIndexOptions || setMapperIndexOptionsPruneToFalse )));
843841
844842 try {
845843 performTypeQueryFinalizationTest (mapperService , shouldQueryPrune , queryPruningConfig , resultShouldNotBePruned == false );
@@ -872,8 +870,8 @@ private IndexVersion getIndexVersionForTest(boolean usePreviousIndex) {
872870 private MapperService getMapperServiceForTest (
873871 boolean usePreviousIndex ,
874872 boolean useIndexOptionsDefaults ,
875- boolean explicitIndexOptionsDoNotPrune ) throws IOException
876- {
873+ boolean explicitIndexOptionsDoNotPrune
874+ ) throws IOException {
877875 // get the index version of the test to use
878876 // either a current version that supports index options, or a previous version that does not
879877 IndexVersion indexVersion = getIndexVersionForTest (usePreviousIndex );
0 commit comments