-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Introduce reroute method on IngestDocument #94000
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
felixbarny
merged 28 commits into
elastic:main
from
felixbarny:ingest-document-redirect
Mar 22, 2023
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
a66a11e
Introduce redirect method on IngestDocument
felixbarny 0a41d94
Add changelog
felixbarny 47581d5
Skipp full pipeline even if invoked via pipeline processor
felixbarny fc34a28
Encapsulate more state in PipelineIterator
felixbarny b1c7b26
Only one boolean flag in IngestDocument
felixbarny d766c62
Reset redirect at the end of the handler
felixbarny 5dd4d27
Apply spotless suggestions
felixbarny 3b64727
Rename method and add javadoc
felixbarny 1bfcf55
Reroute to remain
felixbarny 98d7c94
Add test that final pipeline can't reroute
felixbarny 9e5df7e
Merge branch 'main' into ingest-document-redirect
elasticmachine 8ef09c0
Update test
joegallo f1a3b3e
Update docs/changelog/94000.yaml
felixbarny f0d7be0
Merge branch 'main' into ingest-document-redirect
joegallo 117d89c
Move this resetReroute call earlier
joegallo 5bc367f
Pull this block out of the else
joegallo 61e5617
Reorder these blocks
joegallo 35983d5
Add/tweak comments
joegallo 5dfebb6
Add more context to error message
joegallo 5dac7c2
Merge remote-tracking branch 'origin/main' into ingest-document-redirect
felixbarny 2dc42e1
Adjust test to assert that final pipeline is not executed twice
felixbarny f3a2ad6
Merge branch 'main' into ingest-document-redirect
elasticmachine 25e4a78
Merge branch 'main' into ingest-document-redirect
joegallo 8dbef75
Make PipelineIterator an iterator over a triple
joegallo 53f0b24
Rename this method and add a docstring
joegallo 2db2a19
The final pipeline slot should be isFinal, of course
joegallo 83112f8
Merge branch 'main' into ingest-document-redirect
joegallo e86579e
Actually, getPipeline is all we need here
joegallo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 94000 | ||
summary: Introduce redirect method on IngestDocument | ||
area: Ingest Node | ||
type: enhancement | ||
issues: | ||
- 83653 |
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
@joegallo what do you think bout adding the history of the _index field in an ingest metadata field? This wouldn't be indexed by default but in order to debug, users can use a
set
processor to add this to the documents: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.
I'm not opposed to adding a mechanism like that in a future PR, but I would like to keep the scope of this PR fixed.
When we do add that mechanism, though, I'd prefer that the list be an immutable reference to the collection we're tracking for index recursion purposes, rather than a new collection. Similarly,
appendFieldValue
is more for processors to use when the first argument is customer-provided -- we can just traverse the data structures ourselves inIngestService
, there's no need for string parsing and evaluation there.