Skip to content

Conversation

@ioanatia
Copy link
Contributor

@ioanatia ioanatia commented Sep 23, 2025

Tracked in #123389

This adds operator tests for LinearScoreEvalOperator and RrfScoreEvalOperator.

The tests uncovered some cases where if a CircuitBreakerException is raised doing the execution, the LinearScoreEvalOperator and RrfScoreEvalOperator were not always releasing all the blocks.

Another issue we uncovered with the operator tests is that the LinearScoreEvalOperatordid not have a proper operator status. Unlike RrfScoreEvalOperator, the LinearScoreEvalOperator cannot inherit from AbstractPageMappingOperator.
When score normalization is used, we need to preprocess all pages before we output any pages.
So we add a custom Operator, which is inspired by other examples in the codebase.
Adding a custom Operator also comes with its own transport version.
This also meant bumping the EsqlCapability for FUSE, so bwc tests don't fail when the new transport version does not exist on older nodes.

@ioanatia ioanatia added >test Issues or PRs that are addressing/adding tests Team:Search - Relevance The Search organization Search Relevance team v9.2.0 :Search Relevance/ES|QL Search functionality in ES|QL labels Sep 23, 2025
@ioanatia ioanatia marked this pull request as ready for review September 25, 2025 11:05
@elasticsearchmachine elasticsearchmachine added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Sep 25, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-relevance (Team:Search Relevance)

@elasticsearchmachine elasticsearchmachine removed the Team:Search - Relevance The Search organization Search Relevance team label Sep 25, 2025
Copy link
Member

@carlosdelest carlosdelest left a comment

Choose a reason for hiding this comment

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

LGTM!

A couple of questions regarding named writeables registration and normalization testing

}

private LinearConfig randomConfig() {
return new LinearConfig(LinearConfig.Normalizer.NONE, randomWeights());
Copy link
Member

Choose a reason for hiding this comment

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

Should we test other normalizations as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes - I plan to add more tests - for all normalizations, when scores are nulls, multivalues etc.

@ioanatia ioanatia merged commit c94f366 into elastic:main Sep 25, 2025
34 checks passed
@ioanatia ioanatia deleted the fuse_operator_tests branch September 25, 2025 12:37
szybia added a commit to szybia/elasticsearch that referenced this pull request Sep 25, 2025
…-dls

* upstream/main: (100 commits)
  ES|QL: Add FUSE operator tests (elastic#135307)
  [D0CS] Revise connector setup steps in documentation (elastic#135426)
  Fix DiscoveryDisruptionIT.testElectMasterWithLatestVersion (elastic#135396)
  [DOCS] Marks the change point agg as GA (elastic#134898)
  Rework ShardSearchContextId to explain use of searcher id better (elastic#135233)
  [CI] Handle caching bwc dependencies more gracefully (elastic#135417)
  Mute org.elasticsearch.gradle.TestClustersPluginFuncTest override jdk usage via ES_JAVA_HOME for known jdk os incompatibilities elastic#135413
  [Build] update eclipse formatter used by spotless (elastic#135382)
  [Test] Fix typo in build tool tests (elastic#135405)
  Fixes testSnapshotShutdownProgressTracker (elastic#134926)
  Mute org.elasticsearch.upgrades.StandardToLogsDbIndexModeRollingUpgradeIT testLogsIndexing {upgradedNodes=1} elastic#135313
  OTLP: remove feature flag (elastic#135401)
  [Docs] Convert asciidoc lifecycle markers into Docs V3 syntax (elastic#135347)
  Mute org.elasticsearch.upgrades.QueryableBuiltInRolesUpgradeIT testBuiltInRolesSyncedOnClusterUpgrade elastic#135194
  Mute org.elasticsearch.upgrades.IndexingIT testIndexing elastic#135407
  Mute org.elasticsearch.upgrades.DataStreamsUpgradeIT testDataStreamValidationDoesNotBreakUpgrade elastic#135406
  [CI] Handle git snapshot BWC versions correctly when calculating jdk fallback (elastic#135399)
  [Build] Update checkstyle from 10.3 to 11.0.1 (elastic#135381)
  Mute org.elasticsearch.upgrades.TextRollingUpgradeIT testIndexing {upgradedNodes=2} elastic#135238
  Mute org.elasticsearch.upgrades.MatchOnlyTextRollingUpgradeIT testIndexing {upgradedNodes=2} elastic#135325
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Search Relevance/ES|QL Search functionality in ES|QL Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch >test Issues or PRs that are addressing/adding tests v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants