-
Notifications
You must be signed in to change notification settings - Fork 25.6k
add plugin mechanism for handling source storage and retrieval - index level #1815
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
Conversation
|
Heya, looks much better. Some notes:
|
|
I just pushed the following changes
|
|
More comments :): Also, can you squash your comments into a single one?
|
|
I have updated SourceFieldMapper as you requested, squashed everything into a single commit and rebased it against the master. Regarding the test, I intentionally implemented it in such a way that if the dehydrate method returns null, the rehydrate method is not called on retrieval. I thought it would be a nice way for the provider to indicate if source is "enabled" or "disabled" for the given record. Should I change it so rehydrate is always called? By the way, here is an alternative version with a provider implemented completely on the index level: imotov@58931d3 If you still think that implementation with one provider per index is better, I can close this pull request and open another one based on that version. |
|
I like the index level source provider much better :), lets go with that one for now, can you create another pull request? Regarding returning null, I think that it makes sense for a case where the source provider does not persist anything the index index, but still can provide the source based on the type/id. |
|
Moved to #1847 |
Here is another version to compare. I moved configuration completely to the index level and kept compression and include/exclude functionality in the SourceFieldMapper. I think it looks much simpler and doesn't loose any functionality.