Skip to content

Commit 1cf1bf7

Browse files
committed
Add comments
1 parent 3f23211 commit 1cf1bf7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

x-pack/plugin/ent-search/src/main/java/org/elasticsearch/xpack/application/rules/RuleQueryBuilder.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,13 +252,15 @@ protected QueryBuilder doRewrite(QueryRewriteContext queryRewriteContext) {
252252

253253
for (MultiGetItemResponse item : multiGetResponse) {
254254
String rulesetId = item.getId();
255+
// this usually happens when the system index does not exist because no query rules were created yet
255256
if (item.isFailed()) {
256257
listener.onFailure(item.getFailure().getFailure());
257258
return;
258259
}
259260

260261
GetResponse getResponse = item.getResponse();
261262

263+
// this happens when an individual query ruleset cannot be found
262264
if (getResponse.isExists() == false) {
263265
listener.onFailure(new ResourceNotFoundException("query ruleset " + rulesetId + " not found"));
264266
return;

0 commit comments

Comments
 (0)