Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Expand Up @@ -1616,7 +1616,7 @@ public XContentBuilder innerToXContent(XContentBuilder builder, Params params) t
if (subSearchSourceBuilders.size() == 1) {
builder.field(QUERY_FIELD.getPreferredName(), subSearchSourceBuilders.get(0).getQueryBuilder());
} else {
builder.array(SUB_SEARCHES_FIELD.getPreferredName(), subSearchSourceBuilders);
builder.xContentList(SUB_SEARCHES_FIELD.getPreferredName(), subSearchSourceBuilders);
Copy link
Member

Choose a reason for hiding this comment

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

TIL about xContentList nice.

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ protected MultiGetShardRequest mutateInstance(MultiGetShardRequest instance) thr
}
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/96910")
public void testForceSyntheticUnsupported() {
MultiGetShardRequest request = createTestInstance(true);
StreamOutput out = new BytesStreamOutput();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.atomic.AtomicBoolean;
Expand Down Expand Up @@ -257,11 +258,13 @@ public void testWillCallRequestCacheKeyDifferentiators() throws IOException {
assertThat(invoked.get(), is(true));
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/96910")
public void testForceSyntheticUnsupported() throws IOException {
SearchRequest request = createSearchRequest();
if (request.source() != null) {
request.source().rankBuilder(null);
if (request.source().subSearches().size() >= 2) {
request.source().subSearches(new ArrayList<>());
}
}
request.setForceSyntheticSource(true);
ShardSearchRequest shardRequest = createShardSearchReqest(request);
Expand Down