Skip to content

Conversation

@rjernst
Copy link
Member

@rjernst rjernst commented May 14, 2015

This adds back the ability to disable _source, as well as set includes
and excludes. However, it also restricts these settings to not be
updateable. enabled was actually already not modifiable, but no
conflict was previously given if an attempt was made to change it.

This also adds a check that can be made on the source mapper to
know if the the source is "complete" and can be used for
purposes other than returning in search or get requests. There is
one example use here in highlighting, but more need to be added
in a follow up issue (eg in the update API).

closes #11116

This adds back the ability to disable _source, as well as set includes
and excludes. However, it also restricts these settings to not be
updateable. enabled was actually already not modifiable, but no
conflict was previously given if an attempt was made to change it.

This also adds a check that can be made on the source mapper to
know if the the source is "complete" and can be used for
purposes other than returning in search or get requests. There is
one example use here in highlighting, but more need to be added
in a follow up issue (eg in the update API).

closes elastic#11116
@rjernst rjernst added v2.0.0-beta1 :Search Foundations/Mapping Index mappings, including merging and defining field types labels May 14, 2015
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should also emit conflicts if simulate is false?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was just following what I saw other mappers doing. Really I think merge should be split into two separate methods, one for validating updates, and the other for applying them?

Copy link
Contributor

Choose a reason for hiding this comment

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

In my dreams, merging would either throw an exception or return a new independent mapping so that we wouldn't need this validation phase :)

@rjernst
Copy link
Member Author

rjernst commented May 14, 2015

@jpountz I pushed a commit simplifying includes/excludes so they can no longer be null.

@jpountz
Copy link
Contributor

jpountz commented May 14, 2015

LGTM

rjernst added a commit that referenced this pull request May 14, 2015
Mappings: Add back support for enabled/includes/excludes in _source
@rjernst rjernst merged commit a6b0f0a into elastic:master May 14, 2015
@rjernst rjernst deleted the fix/11116 branch May 14, 2015 21:41
@uschindler
Copy link
Contributor

Many thanks! -- Uwe

@karmi
Copy link
Contributor

karmi commented May 15, 2015

@rjernst Thanks!

@clintongormley clintongormley changed the title Mappings: Add back support for enabled/includes/excludes in _source Add back support for enabled/includes/excludes in _source field Jun 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>enhancement :Search Foundations/Mapping Index mappings, including merging and defining field types v2.0.0-beta1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Alternatives to disabling or filtering the _source field at index time

5 participants