-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Description
Hiya
Something weird is going on with put_mapping, eg:
- index /foo/one/ -d { "xxx": "text"}
-
mappings for index 'foo' shows the correct mapping for 'one'
- index /foo/two -d {"yyy": "text"}
-
mappings for index 'foo' shows the mapping for 'one' but not 'two'
or
- index /foo/one/ -d { "xxx": "text"}
-
mappings for index 'foo' shows the correct mapping for 'one'
- put_mapping /foo/two -d { properties: {"yyy": { type: "string"}}}
-
mappings for index 'foo' shows the mapping for 'one' but not 'two'
or
- put_mapping /foo/one -d { properties: {"xxx": { type: "string"}}}
-
mappings for index 'foo' shows the correct mapping for 'one'
- put_mapping /foo/two -d { properties: {"yyy": { type: "string"}}}
-
mappings for index 'foo' shows the mapping for 'two' but not for 'one'
Example below:
curl -XPOST 'http://127.0.0.2:9200/foo/one' -d '
{
"xxx" : "text"
}
'
# {
# "ok" : true,
# "_index" : "foo",
# "_id" : "340e1d15-3dfd-4a8e-95ec-1c29fb8e9182",
# "_type" : "one"
# }
Server log:
-----------
Index [foo]: Update mapping [one] (dynamic) with source [{
"one" : {
"type" : "object",
"dynamic" : true,
"enabled" : true,
"pathType" : "full",
"dateFormats" : [ "dateOptionalTime" ],
"boostField" : {
"name" : "_boost"
},
"properties" : {
"xxx" : {
"type" : "string",
"indexName" : "xxx",
"index" : "analyzed",
"store" : "no",
"termVector" : "no",
"boost" : 1.0,
"omitNorms" : false,
"omitTermFreqAndPositions" : false
}
}
}
}]
Cluster-state: indices.foo.mappings.mapping.value:
--------------------------------------------------
'{
"one" : {
"type" : "object",
"dynamic" : true,
"enabled" : true,
"pathType" : "full",
"dateFormats" : [ "dateOptionalTime" ],
"boostField" : {
"name" : "_boost"
},
"properties" : {
"xxx" : {
"type" : "string",
"indexName" : "xxx",
"index" : "analyzed",
"store" : "no",
"termVector" : "no",
"boost" : 1.0,
"omitNorms" : false,
"omitTermFreqAndPositions" : false
}
}
}
}'
curl -XPOST 'http://127.0.0.2:9200/foo/two' -d '
{
"yyy" : "text"
}
'
# {
# "ok" : true,
# "_index" : "foo",
# "_id" : "c57b2421-943e-4623-be80-8168211fca5d",
# "_type" : "two"
# }
Server log:
-----------
Update mapping [two] (dynamic) with source [{
"two" : {
"type" : "object",
"dynamic" : true,
"enabled" : true,
"pathType" : "full",
"dateFormats" : [ "dateOptionalTime" ],
"boostField" : {
"name" : "_boost"
},
"properties" : {
"yyy" : {
"type" : "string",
"indexName" : "yyy",
"index" : "analyzed",
"store" : "no",
"termVector" : "no",
"boost" : 1.0,
"omitNorms" : false,
"omitTermFreqAndPositions" : false
}
}
}
}]
Cluster-state: indices.foo.mappings.mapping.value:
--------------------------------------------------
'{
"one" : {
"type" : "object",
"dynamic" : true,
"enabled" : true,
"pathType" : "full",
"dateFormats" : [ "dateOptionalTime" ],
"boostField" : {
"name" : "_boost"
},
"properties" : {
"xxx" : {
"type" : "string",
"indexName" : "xxx",
"index" : "analyzed",
"store" : "no",
"termVector" : "no",
"boost" : 1.0,
"omitNorms" : false,
"omitTermFreqAndPositions" : false
}
}
}
}'
Metadata
Metadata
Assignees
Labels
No labels