Skip to content

Join field type throwing "current_type [join], merged_type [ObjectMapper]" in 7.1.0 #43012

@ffknob

Description

@ffknob

Elasticsearch version:
7.1.0

Plugins installed: []

JVM version (java -version):
openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-suse-lp150.7.1-x8664)
OpenJDK 64-Bit Server VM (build 10.0.2+13-suse-lp150.7.1-x8664, mixed mode)

OS version (uname -a if on a Unix-like system):
Linux berlin 4.12.14-lp150.12.25-default #1 SMP Thu Nov 1 06:14:23 UTC 2018 (3fcf457) x86_64 x86_64 x86_64 GNU/Linux

Description of the problem including expected versus actual behavior:
I was trying to follow the examples provided by the documentation related to the join field type, but I could not reproduce them in 7.1.0. Although they work in 6.5.0.

Steps to reproduce:

  1. Create the index
PUT my-index
{
  "mappings": {
    "properties": {
      "text": {
        "type":  "text"
      },
      "join": {
        "type": "join",
        "relations": {
          "question": "answer"
        }
      } 
    }
  }
}
  1. Try to create a parent document:
POST my-index/1
{
  "text": "test",
  "join": {
    "name": "question"
  }
}

Result:

{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "mapper [join] of different type, current_type [join], merged_type [ObjectMapper]"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "mapper [join] of different type, current_type [join], merged_type [ObjectMapper]"
  },
  "status": 400
}

The same example (with doc as a type) work in 6.5.0.

Provide logs (if relevant):

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Search Foundations/MappingIndex mappings, including merging and defining field types>bugTeam:Search FoundationsMeta label for the Search Foundations team in Elasticsearch

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions