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
6 changes: 6 additions & 0 deletions docs/changelog/128153.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 128153
summary: "Fix: Add `NamedWriteable` for `RuleQueryRankDoc`"
area: Relevance
type: bug
issues:
- 126071
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.elasticsearch.plugins.SystemIndexPlugin;
import org.elasticsearch.rest.RestController;
import org.elasticsearch.rest.RestHandler;
import org.elasticsearch.search.rank.RankDoc;
import org.elasticsearch.xcontent.ParseField;
import org.elasticsearch.xpack.application.analytics.AnalyticsTemplateRegistry;
import org.elasticsearch.xpack.application.analytics.action.DeleteAnalyticsCollectionAction;
Expand Down Expand Up @@ -179,6 +180,7 @@
import org.elasticsearch.xpack.application.rules.action.TransportPutQueryRulesetAction;
import org.elasticsearch.xpack.application.rules.action.TransportTestQueryRulesetAction;
import org.elasticsearch.xpack.application.rules.retriever.QueryRuleRetrieverBuilder;
import org.elasticsearch.xpack.application.rules.retriever.RuleQueryRankDoc;
import org.elasticsearch.xpack.application.search.SearchApplicationIndexService;
import org.elasticsearch.xpack.application.search.action.DeleteSearchApplicationAction;
import org.elasticsearch.xpack.application.search.action.GetSearchApplicationAction;
Expand Down Expand Up @@ -351,6 +353,11 @@ protected XPackLicenseState getLicenseState() {
return Collections.unmodifiableList(actionHandlers);
}

@Override
public List<NamedWriteableRegistry.Entry> getNamedWriteables() {
return List.of(new NamedWriteableRegistry.Entry(RankDoc.class, RuleQueryRankDoc.NAME, RuleQueryRankDoc::new));
}

@Override
public List<RestHandler> getRestHandlers(
Settings settings,
Expand Down