Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kderusso committed Mar 4, 2024
1 parent d42d88f commit 49039da
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ protected void doXContent(XContentBuilder builder, Params params) throws IOExcep
}

@Override
protected QueryBuilder doRewrite(QueryRewriteContext queryRewriteContext) throws IOException {
protected QueryBuilder doRewrite(QueryRewriteContext queryRewriteContext) {
if (weightedTokensSupplier != null) {
if (weightedTokensSupplier.get() == null) {
return this;
Expand All @@ -183,8 +183,8 @@ protected QueryBuilder doRewrite(QueryRewriteContext queryRewriteContext) throws
inferRequest.setPrefixType(TrainedModelPrefixStrings.PrefixType.SEARCH);

SetOnce<TextExpansionResults> textExpansionResultsSupplier = new SetOnce<>();
queryRewriteContext.registerAsyncAction((client, listener) -> {
executeAsyncWithOrigin(
queryRewriteContext.registerAsyncAction(
(client, listener) -> executeAsyncWithOrigin(
client,
ML_ORIGIN,
CoordinatedInferenceAction.INSTANCE,
Expand Down Expand Up @@ -215,8 +215,8 @@ protected QueryBuilder doRewrite(QueryRewriteContext queryRewriteContext) throws
);
}
}, listener::onFailure)
);
});
)
);

return new TextExpansionQueryBuilder(this, textExpansionResultsSupplier);
}
Expand Down

0 comments on commit 49039da

Please sign in to comment.