- Notifications
You must be signed in to change notification settings - Fork 25.5k
Adding a getUnmodifiableSourceAndMetadata() method to IngestDocument #134816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
masseyke merged 13 commits into elastic:main from masseyke:expose-ConditionalProcessor-unmodifiable-map Sep 18, 2025
Merged
Adding a getUnmodifiableSourceAndMetadata() method to IngestDocument #134816
masseyke merged 13 commits into elastic:main from masseyke:expose-ConditionalProcessor-unmodifiable-map Sep 18, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
…ses in the package
Pinging @elastic/es-data-management (Team:Data Management) |
joegallo reviewed Sep 18, 2025
server/src/main/java/org/elasticsearch/ingest/IngestDocument.java Outdated Show resolved Hide resolved
joegallo reviewed Sep 18, 2025
server/src/main/java/org/elasticsearch/ingest/IngestDocument.java Outdated Show resolved Hide resolved
joegallo approved these changes Sep 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just do a little polishing on those comments that I indicated, please.
szybia added a commit to szybia/elasticsearch that referenced this pull request Sep 18, 2025
* upstream/main: (43 commits) Unmute testAckedIndexing to see if it still fails on main (elastic#134682) Silence time zone ID deprecation warning for JDK 25 due to log4j2 bug. (elastic#134719) Adding a getUnmodifiableSourceAndMetadata() method to IngestDocument (elastic#134816) Mark the create-index-from-source action as publicly available on Serverless (elastic#134953) ESQL: Rename command from INLINESTATS to INLINE STATS (elastic#134827) Document multi index query support for simplified retrievers (elastic#134980) [ML] Fix YAMl test to use correct query parameter type (elastic#134999) [Transform] Wait for PIT to close (elastic#134955) Add XPath to XmlUtils (elastic#134923) Fixing conditional processor mutability bugs (elastic#134936) [Transform] Lower loglevel of 3 transform-related error messages from ERROR to WARN (elastic#134985) Unmute pattern text tests. (elastic#134981) Integrate weights into simplified RRF retriever syntax (elastic#132680) Mute org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT test {csv-spec:stats.CountDistinctWithConditions} elastic#134993 Update periodic java-ea build to test java 26 pre-release (elastic#134983) Mute org.elasticsearch.xpack.esql.ccq.MultiClusterSpecIT test {csv-spec:stats.CountDistinctWithConditions} elastic#134984 Fix and unmute testIndexSettingProviderPrivateSetting (elastic#134861) Add missing common cat params (elastic#134870) Support querying multiple indices with the simplified RRF retriever (elastic#134822) Allow including semantic field embeddings in _source (elastic#134717) ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >refactoring Team:Data Management Meta label for data/management team v9.2.0
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
We plan to use conditional scripts in order to decide whether to randomly sample a document for later retrieval. This change moves the logic that ConditionalProcessor uses to create an unmodifiable view of IngestDocument's source map into a new
getUnmodifiableSourceAndMetadata()
method in IngestDocument.The unmutable-related code was moved from ConditionalProcessor to IngestDocument unmodified. There is no change in functionality. The unit tests were ported to IngestDocumentTests. I have also added a test that shows what the behavior is when a user attempts to modify a byte[].
You can see its expected usage in a prototype at #134233