Skip to content

Commit

Permalink
Restore useful assert.
Browse files Browse the repository at this point in the history
  • Loading branch information
afoucret committed May 30, 2024
1 parent 3851504 commit 0a27bb1
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ protected boolean isWindowSizeRequired() {
* execute the rescore against a particular shard.
*/
public final RescoreContext buildContext(SearchExecutionContext context) throws IOException {
if (isWindowSizeRequired()) {
assert windowSize != null;
}
int finalWindowSize = windowSize == null ? DEFAULT_WINDOW_SIZE : windowSize;

return innerBuildContext(finalWindowSize, context);
Expand Down

0 comments on commit 0a27bb1

Please sign in to comment.