@@ -198,7 +198,8 @@ protected void mappingWithIndexOptionsPruneFalse(XContentBuilder b) throws IOExc
198198 b .endObject ();
199199 }
200200
201- private void mapping (XContentBuilder b , @ Nullable Boolean prune , PruningConfig pruningConfig , Boolean previousVersion ) throws IOException {
201+ private void mapping (XContentBuilder b , @ Nullable Boolean prune , PruningConfig pruningConfig , Boolean previousVersion )
202+ throws IOException {
202203 b .field ("type" , "sparse_vector" );
203204 if (previousVersion == false && prune != null ) {
204205 b .startObject ("index_options" );
@@ -727,7 +728,9 @@ private enum PruningScenario {
727728 }
728729
729730 private enum PruningConfig {
730- NULL , EXPLICIT_DEFAULT , STRICT
731+ NULL ,
732+ EXPLICIT_DEFAULT ,
733+ STRICT
731734 }
732735
733736 private final Set <PruningOptions > validIndexPruningScenarios = Set .of (
@@ -777,8 +780,7 @@ public void testPruningScenarios() throws Exception {
777780 for (int i = 0 ; i < 120 ; i ++) {
778781 assertPruningScenario (
779782 randomFrom (validIndexPruningScenarios ),
780- new PruningOptions (randomBoolean () ? randomBoolean () : null ,
781- randomFrom (PruningConfig .values ()))
783+ new PruningOptions (randomBoolean () ? randomBoolean () : null , randomFrom (PruningConfig .values ()))
782784 );
783785 }
784786 }
@@ -865,8 +867,7 @@ private List<Query> getExpectedQueryClauses(
865867 }).collect (Collectors .toUnmodifiableList ());
866868 }
867869
868- private void assertPruningScenario (PruningOptions indexPruningOptions , PruningOptions queryPruningOptions )
869- throws IOException {
870+ private void assertPruningScenario (PruningOptions indexPruningOptions , PruningOptions queryPruningOptions ) throws IOException {
870871
871872 boolean usePreIndexOptionsIndex = false ;
872873 if (indexPruningOptions .prune == null && indexPruningOptions .pruningConfig == PruningConfig .NULL ) {
@@ -876,7 +877,11 @@ private void assertPruningScenario(PruningOptions indexPruningOptions, PruningOp
876877 IndexVersion indexVersion = getIndexVersionForTest (usePreIndexOptionsIndex );
877878 MapperService mapperService = createMapperService (indexVersion , getIndexMapping (indexPruningOptions , usePreIndexOptionsIndex ));
878879 Tuple <Boolean , TokenPruningConfig > queryPruneConfig = getQueryPruneConfig (queryPruningOptions );
879- PruningScenario effectivePruningScenario = getEffectivePruningScenario (indexPruningOptions , queryPruningOptions , usePreIndexOptionsIndex );
880+ PruningScenario effectivePruningScenario = getEffectivePruningScenario (
881+ indexPruningOptions ,
882+ queryPruningOptions ,
883+ usePreIndexOptionsIndex
884+ );
880885 withSearchExecutionContext (mapperService , (context ) -> {
881886 SparseVectorFieldMapper .SparseVectorFieldType ft = (SparseVectorFieldMapper .SparseVectorFieldType ) mapperService .fieldType (
882887 "field"
0 commit comments