Skip to content

Store fallback match only text fields in binary doc values#140189

Merged
Kubik42 merged 6 commits intoelastic:mainfrom
Kubik42:match-only-text-fields-binary-doc-values
Jan 12, 2026
Merged

Store fallback match only text fields in binary doc values#140189
Kubik42 merged 6 commits intoelastic:mainfrom
Kubik42:match-only-text-fields-binary-doc-values

Conversation

@Kubik42
Copy link
Copy Markdown
Contributor

@Kubik42 Kubik42 commented Jan 5, 2026

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Hi @Kubik42, I've created a changelog YAML for you.

@Kubik42 Kubik42 force-pushed the match-only-text-fields-binary-doc-values branch 6 times, most recently from b7b1f1c to c7a328b Compare January 6, 2026 23:36
@Kubik42 Kubik42 marked this pull request as ready for review January 7, 2026 02:29
@Kubik42
Copy link
Copy Markdown
Contributor Author

Kubik42 commented Jan 7, 2026

Error in serverless seems unrelated to my changes: #140243 (same error)

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Hi @Kubik42, I've created a changelog YAML for you.

@Kubik42 Kubik42 marked this pull request as draft January 7, 2026 02:29
@Kubik42 Kubik42 force-pushed the match-only-text-fields-binary-doc-values branch 2 times, most recently from 5a7dac4 to c9dbc6c Compare January 8, 2026 20:15
@schase-es
Copy link
Copy Markdown
Contributor

Error in serverless seems unrelated to my changes: #140243 (same error)

This test was muted on December 2nd (#138924) -- can you confirm that you saw this error?

@Kubik42 Kubik42 force-pushed the match-only-text-fields-binary-doc-values branch from ce46054 to 21ac2db Compare January 8, 2026 23:07
@Kubik42
Copy link
Copy Markdown
Contributor Author

Kubik42 commented Jan 8, 2026

Error in serverless seems unrelated to my changes: #140243 (same error)

This test was muted on December 2nd (#138924) -- can you confirm that you saw this error?

I did see the error, but it looks to be gone now.

@Kubik42 Kubik42 force-pushed the match-only-text-fields-binary-doc-values branch 3 times, most recently from f8ce5ef to d91843a Compare January 8, 2026 23:54
if (isSyntheticSourceEnabled()) {
if (storeFallbackFieldsInBinaryDocValues(indexCreatedVersion, indexMode)) {
// For newer indexes, fallback data is stored in binary doc values
return (cache, breaker) -> new BytesBinaryIndexFieldData(
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The legacy (below) implementation uses sorted stored fields. We don't need to sort binary doc values explicitly because of #140244


import java.util.Arrays;

public class MatchOnlyTextRollingUpgradeIT extends AbstractStringTypeLogsdbRollingUpgradeTestCase {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's do this in a seperate PR? This should also replace the existing MatchOnlyTextRollingUpgradeIT?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

imo, this should be bundled in this PR since we're making changes to match only text. Wouldn't want to push something into main that has a bug that these tests would've caught.

And yes, this will replace the legacy MatchOnlyTextRollingUpgradeIT. I will delete it in a follow up PR.

# Conflicts:
#	libs/swisshash/src/main/java/module-info.java
#	x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/xpack/logsdb/KeywordRollingUpgradeIT.java
# Conflicts:
#	server/src/main/java/org/elasticsearch/index/IndexVersions.java
#	server/src/main/java/org/elasticsearch/index/mapper/MultiValuedBinaryDocValuesField.java
#	server/src/main/java/org/elasticsearch/index/mapper/TextFieldMapper.java
@Kubik42 Kubik42 force-pushed the match-only-text-fields-binary-doc-values branch from d78b5a3 to bd8566f Compare January 9, 2026 20:25
@Kubik42 Kubik42 marked this pull request as ready for review January 9, 2026 21:38
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Hi @Kubik42, I've created a changelog YAML for you.

Copy link
Copy Markdown
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@Kubik42 Kubik42 merged commit 678df75 into elastic:main Jan 12, 2026
35 checks passed
@Kubik42 Kubik42 deleted the match-only-text-fields-binary-doc-values branch January 12, 2026 16:01
szybia added a commit to szybia/elasticsearch that referenced this pull request Jan 12, 2026
…i-project-tests

* upstream/main: (23 commits)
  Fix `testAckListenerReceivesNacksIfPublicationTimesOut` (elastic#140514)
  Reduce priority of clear-cache tasks (elastic#139685)
  Add docs and tests about `StreamOutput` to memory (elastic#140365)
  ES|QL - dense_vector support for COUNT, PRESENT, ABSENT aggregator functions (elastic#139914)
  Add release notes for v9.2.4 release (elastic#140487)
  Add release notes for v9.1.10 release (elastic#140488)
  Add conncectors release notes for 9.1.10, 9.2.4 (elastic#140499)
  Add parameter support in PromQL query durations (elastic#139873)
  Improve testing of STS credentials reloading (elastic#140114)
  Fix zstd native binary publishing script to support newer versions (elastic#140485)
  Add FlattenedFieldBinaryVsSortedSetDocValuesSyntheticSourceIT (elastic#140489)
  Store fallback match only text fields in binary doc values (elastic#140189)
  [DiskBBQ] Use the new merge executor for intra-merge parallelism (elastic#139942)
  ESQL: introduce support for mapping-unavailable fields (elastic#140463)
  Add ESNextOSQVectorsScorerTests (elastic#140436)
  Disable high cardinality tests on release builds (elastic#140503)
  ESQL: TRange timezone support (elastic#139911)
  Directly compressing `StreamOutput` (elastic#140502)
  ES|QL - fix dense vector enrich bug (elastic#139774)
  Use CrossProjectModeDecider in RemoteClusterService (elastic#140481)
  ...
spinscale pushed a commit to spinscale/elasticsearch that referenced this pull request Jan 21, 2026
…40189)

* testing

* Migrate TextRollingUpgradeIT to run in serverless

# Conflicts:
#	libs/swisshash/src/main/java/module-info.java
#	x-pack/plugin/logsdb/qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/xpack/logsdb/KeywordRollingUpgradeIT.java

* Store fallback text fields in binary doc values

# Conflicts:
#	server/src/main/java/org/elasticsearch/index/IndexVersions.java
#	server/src/main/java/org/elasticsearch/index/mapper/MultiValuedBinaryDocValuesField.java
#	server/src/main/java/org/elasticsearch/index/mapper/TextFieldMapper.java

* Store fallback match only text fields in binary doc values

* Addressed feedback, cleaned up some tests

* Update docs/changelog/140189.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants