-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Mappings: Remove ability to disable _source field #10915
Conversation
I am +1 on that change and the diff looks good to me. Could you add a note to the migration guide? The issue was a bit controversial so @clintongormley could you confirm if this change is good to go? |
+1 on the change too. Does this mean we can also remove the option to store fields separately in the mapping given that we always have the source? Or are there still usecases for that? |
+1 I think this is our only chance to do this. |
the place where I saw it being used is for large documents, where most search requests require only a few fields, and parsing the whole request and extracting it was expensive (the user I helped with it ended up being significant). But, it is an outlier in terms of how often I actually saw it. I like the idea of removing it, since it will simplify the whole crazy logic around handling stored fields and data extracted from source. I think we do need to have a pattern to users that have large documents and want fast access to only small amount of small fields quickly when loading hits, my ideas are doc values or parent/child now that we support fetching inner childs (or just parent) |
It can still be useful for "generated" fields (eg. fields that are populated through copy_to)
Maybe another option than doc values and parent/child could be to break up |
@jpountz Regarding migration docs, I pushed a commit with a simple migration note. |
Thanks @rjernst it looks good! |
+1, LGTM |
+1 |
Current features (eg. update API) and future features (eg. reindex API) depend on _source. This change locks down the field so that it can no longer be disabled. It also removes legacy settings compress/compress_threshold. closes elastic#8142 closes elastic#10915
Current features (eg. update API) and future features (eg. reindex API) depend on _source. This change locks down the field so that it can no longer be disabled. It also removes legacy settings compress/compress_threshold. closes elastic#8142 closes elastic#10915
Just FTR consider this a protest comment. Please do not remove this feature. There are use cases for ES as index-only and not storage |
Awesome thanks! |
In order to reindex documents, _source must be enabled. There are current features (eg. update API) and future features (eg. reindex API) that depend on _source. This change locks down the field so that
it can no longer be disabled. It also removes legacy settings compress/compress_threshold.
For users who "dont use" _source, we have a best_compression option that will store it with generally half the space of previous versions, still keeping the ability to reindex. For users concerned with indexing speed, a lot of work was put into stored fields merging/compression in Lucene 5.
closes #8142