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

martijnvg
Copy link
Member

PR for #7394

@jpountz
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
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
Copy link
Member Author

@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 bugs/_parent_fd_loading_setting branch from 2ea2dee to fa2f3e4 Compare August 26, 2014 16:07
@martijnvg
Copy link
Member Author

@jpountz I updated the PR.

@jpountz
Copy link
Contributor

jpountz commented Aug 26, 2014

LGTM

@jpountz jpountz removed the review label Aug 26, 2014
@martijnvg martijnvg force-pushed the bugs/_parent_fd_loading_setting branch from fa2f3e4 to b6cdb1d Compare August 27, 2014 07:05
@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 bugs/_parent_fd_loading_setting branch May 18, 2015 23:30
@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
@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Parent/Child labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search/Search Search-related issues that do not fall into other categories v1.3.3 v1.4.0.Beta1 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants