@@ -100,7 +100,7 @@ public void setNextReader(LeafReaderContext readerContext) throws IOException {
100
100
public boolean advanceExact (int target ) throws IOException {
101
101
if (sorted .advanceExact (target )) {
102
102
if (sorted .docValueCount () > 1 ) {
103
- throw new IllegalStateException (
103
+ throw new IllegalArgumentException (
104
104
"failed to extract doc:" + target + ", the grouping field must be single valued"
105
105
);
106
106
}
@@ -124,7 +124,7 @@ public long longValue() throws IOException {
124
124
};
125
125
}
126
126
}
127
- default -> throw new IllegalStateException ("unexpected doc values type " + type + "` for field `" + field + "`" );
127
+ default -> throw new IllegalArgumentException ("unexpected doc values type " + type + "` for field `" + field + "`" );
128
128
}
129
129
}
130
130
@@ -201,7 +201,7 @@ public boolean advanceExact(int target) throws IOException {
201
201
if (sorted .advanceExact (target )) {
202
202
ord = (int ) sorted .nextOrd ();
203
203
if (sorted .nextOrd () != SortedSetDocValues .NO_MORE_ORDS ) {
204
- throw new IllegalStateException (
204
+ throw new IllegalArgumentException (
205
205
"failed to extract doc:" + target + ", the grouping field must be single valued"
206
206
);
207
207
}
@@ -233,7 +233,7 @@ public int getValueCount() {
233
233
};
234
234
}
235
235
}
236
- default -> throw new IllegalStateException ("unexpected doc values type " + type + "` for field `" + field + "`" );
236
+ default -> throw new IllegalArgumentException ("unexpected doc values type " + type + "` for field `" + field + "`" );
237
237
}
238
238
}
239
239
0 commit comments