Skip to content
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

Add support for the field data loading option to the `_parent` field. #7402

Merged
merged 1 commit into from Aug 27, 2014

Conversation

Projects
None yet
4 participants
@martijnvg
Copy link
Member

martijnvg commented Aug 22, 2014

PR for #7394

@jpountz

This comment has been minimized.

Copy link
Contributor

jpountz commented Aug 26, 2014

@martijnvg I think there is an issue with the serialization of the mapper that always serializes the fielddata settings. If I do this:

DELETE *

PUT test 
{
  "mappings": {
    "parent": {

    },
    "child": {
      "_parent": {
        "type": "parent"
      }
    }
  }
}

GET test/_mapping

Then I get

{
   "test": {
      "mappings": {
         "parent": {
            "properties": {}
         },
         "child": {
            "_parent": {
               "type": "parent",
               "fielddata": {
                  "loading": "eager"
               }
            },
            "properties": {}
         }
      }
   }
}

Although I should not get fielddata settings since those are the defaults?

@jpountz

This comment has been minimized.

Copy link
Contributor

jpountz commented Aug 26, 2014

(I think the issue comes from the fact that you initialize fielddataSettings to the defaults instead of null in the builder so customFieldDataSettings always ends up being non null.)

@martijnvg

This comment has been minimized.

Copy link
Member Author

martijnvg commented Aug 26, 2014

@jpountz I see, I'll address that and make sure it only gets serialized when the loading is not equal to "eager".

@s1monw s1monw removed the review label Aug 26, 2014

@martijnvg martijnvg force-pushed the martijnvg:bugs/_parent_fd_loading_setting branch Aug 26, 2014

@martijnvg

This comment has been minimized.

Copy link
Member Author

martijnvg commented Aug 26, 2014

@jpountz I updated the PR.

@martijnvg martijnvg added the review label Aug 26, 2014

@jpountz

This comment has been minimized.

Copy link
Contributor

jpountz commented Aug 26, 2014

LGTM

@jpountz jpountz removed the review label Aug 26, 2014

@martijnvg martijnvg force-pushed the martijnvg:bugs/_parent_fd_loading_setting branch to b6cdb1d Aug 27, 2014

@martijnvg martijnvg merged commit b6cdb1d into elastic:master Aug 27, 2014

martijnvg added a commit that referenced this pull request Aug 27, 2014

martijnvg added a commit that referenced this pull request Aug 27, 2014

@clintongormley clintongormley changed the title Parent/child: Add missing support for the field data loading option to the `_parent` field. Parent/child: Add support for the field data loading option to the `_parent` field. Sep 8, 2014

martijnvg added a commit that referenced this pull request Sep 8, 2014

@clintongormley clintongormley changed the title Parent/child: Add support for the field data loading option to the `_parent` field. Parent/Child: Add support for the field data loading option to the `_parent` field. Sep 8, 2014

@martijnvg martijnvg deleted the martijnvg:bugs/_parent_fd_loading_setting branch May 18, 2015

@clintongormley clintongormley changed the title Parent/Child: Add support for the field data loading option to the `_parent` field. Add support for the field data loading option to the `_parent` field. Jun 7, 2015

mute pushed a commit to mute/elasticsearch that referenced this pull request Jul 29, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.