Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
setup:
- do:
bulk:
refresh: true
index: test-index1
body:
- index:
_id: foo
- { "text": "foo - pinned doc for foo" }

---
"query rules retriever when the .query-rules system index is missing":
- skip:
features: [ headers ]
- do:
headers:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick - we probably can omit the headers for this test

# Force JSON content type so that we use a parser that interprets the floating-point score as a double
Content-Type: application/json
search:
index: test-index1
body:
retriever:
rule:
match_criteria:
foo: foo
bar: bar
ruleset_ids:
abc
retriever:
standard:
query:
query_string:
query: bar
explain: true
catch: "missing"
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,11 @@ protected QueryBuilder doRewrite(QueryRewriteContext queryRewriteContext) {

for (MultiGetItemResponse item : multiGetResponse) {
String rulesetId = item.getId();
if (item.isFailed()) {
listener.onFailure(item.getFailure().getFailure());
return;
}

GetResponse getResponse = item.getResponse();

if (getResponse.isExists() == false) {
Expand Down