Skip to content

Conversation

GalLalouche
Copy link
Contributor

A follow up fixing https://github.com/elastic/elasticsearch/pull/119886/files/e32a4463e8a4015c7be17cb984a80e79ed1e45c5#r2287545802.

The original issue, as mentioned in the comment, was triggered by multiple indices sharing the same mapping. This PR fixes it by reading the FieldCapabilitiesResponse directly instead.

@GalLalouche GalLalouche added >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) auto-backport Automatically create backport pull requests when merged :Analytics/ES|QL AKA ESQL v9.0.1 v9.1.0 v9.2.0 labels Aug 21, 2025
@GalLalouche GalLalouche force-pushed the gall_bug/fix_insist_same_mapping_20250821 branch from 407cd8b to 1e6f531 Compare August 21, 2025 08:38
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@GalLalouche GalLalouche requested a review from astefan August 21, 2025 08:58

var isPartiallyUnmapped = fcs.size() < numberOfIndices;
if (isPartiallyUnmapped) {
if (fieldCapsResponse.getIndexResponses().stream().allMatch(fcir -> fcir.get().containsKey(fullName)) == false) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I suspect this could be a bit expensive for many fields or many indices or both cases.
Lets check if this affects esql/from_idx_limit_1 benchmark after merging.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've fixed the potential issue by instead of also taking into account the number of mapping hash duplicates.

Copy link
Contributor

@astefan astefan left a comment

Choose a reason for hiding this comment

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

LGTM

@GalLalouche GalLalouche enabled auto-merge (squash) August 27, 2025 20:07
@GalLalouche GalLalouche merged commit 19c035f into elastic:main Aug 27, 2025
33 checks passed
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
9.0 Commit could not be cherrypicked due to conflicts
9.1 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 133298

GalLalouche added a commit to GalLalouche/elasticsearch that referenced this pull request Aug 28, 2025
…e same mapping (elastic#133298)

A follow up fixing https://github.com/elastic/elasticsearch/pull/119886/files/e32a4463e8a4015c7be17cb984a80e79ed1e45c5#r2287545802.

The original issue, as mentioned in the comment, was triggered by multiple indices sharing the same mapping. This PR fixes it by reading the FieldCapabilitiesResponse directly instead.
GalLalouche added a commit to GalLalouche/elasticsearch that referenced this pull request Aug 28, 2025
…e same mapping (elastic#133298)

A follow up fixing https://github.com/elastic/elasticsearch/pull/119886/files/e32a4463e8a4015c7be17cb984a80e79ed1e45c5#r2287545802.

The original issue, as mentioned in the comment, was triggered by multiple indices sharing the same mapping. This PR fixes it by reading the FieldCapabilitiesResponse directly instead.
elasticsearchmachine pushed a commit that referenced this pull request Aug 28, 2025
…e same mapping (#133298) (#133698)

A follow up fixing https://github.com/elastic/elasticsearch/pull/119886/files/e32a4463e8a4015c7be17cb984a80e79ed1e45c5#r2287545802.

The original issue, as mentioned in the comment, was triggered by multiple indices sharing the same mapping. This PR fixes it by reading the FieldCapabilitiesResponse directly instead.
elasticsearchmachine pushed a commit that referenced this pull request Aug 28, 2025
…e same mapping (#133298) (#133699)

A follow up fixing https://github.com/elastic/elasticsearch/pull/119886/files/e32a4463e8a4015c7be17cb984a80e79ed1e45c5#r2287545802.

The original issue, as mentioned in the comment, was triggered by multiple indices sharing the same mapping. This PR fixes it by reading the FieldCapabilitiesResponse directly instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL auto-backport Automatically create backport pull requests when merged backport pending >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.0.1 v9.1.0 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants