Hi, does anyone know how to solve the following exception?
../config/default-mapping.json
{
"default " : {
}
}
curl -XPUT '127.0.0.1:9200/mapperparsingexception/serializevalue/1' -d
'{
"serializevalue": [
{
"file": 1
},
[
"file.name",
"1"
]
]
}'
{"error":"MapperParsingException[object mapping [serializevalue]
trying to serialize a value with no field associated with it, current
value [file.name]]","status":400}
dadoonet
(David Pilato)
May 2, 2012, 9:34am
2
you wrote "file.name", "1"
You should write something like "file.name": "1"
"field":"value"
HTH
David
Twitter : @dadoonet / @elasticsearchfr
Le 2 mai 2012 à 11:29, haiyun zhang haiyun.document@gmail.com a écrit :
Hi, does anyone know how to solve the following exception?
../config/default-mapping.json
{
"default " : {
}
}
curl -XPUT '127.0.0.1:9200/mapperparsingexception/serializevalue/1' -d
'{
"serializevalue": [
{
"file": 1
},
[
"file.name",
"1"
]
]
}'
{"error":"MapperParsingException[object mapping [serializevalue]
trying to serialize a value with no field associated with it, current
value [file.name]]","status":400}
thanks,
curl -XPUT '127.0.0.1:9200/mapperparsingexception/serializevalue/1' -d '{
"serializevalue": [
{
"file": 1
},
{
"file.name":"1"
}
]
}'
{"ok":true,"_index":"mapperparsingexception","_type":"serializevalue","_id":"1","_version":1}
but, I just want index array type with different core type and object type
ex:
{
"target": [
"string",
"integer",
"long",
"boolean",
{
"key": "value"
},
[
"string",
"boolean"
]
]
}
2012/5/2 David Pilato david@pilato.fr
you wrote "file.name", "1"
You should write something like "file.name": "1"
"field":"value"
HTH
David
Twitter : @dadoonet / @elasticsearchfr
Le 2 mai 2012 à 11:29, haiyun zhang haiyun.document@gmail.com a écrit :
Hi, does anyone know how to solve the following exception?
../config/default-mapping.json
{
"default " : {
}
}
curl -XPUT '127.0.0.1:9200/mapperparsingexception/serializevalue/1' -d
'{
"serializevalue": [
{
"file": 1
},
[
"file.name",
"1"
]
]
}'
{"error":"MapperParsingException[object mapping [serializevalue]
trying to serialize a value with no field associated with it, current
value [file.name]]","status":400}
dadoonet
(David Pilato)
May 2, 2012, 10:46am
4
If I understood what you wrote, I don't think you can as a field can not be seen as two different core type.
David
Twitter : @dadoonet / @elasticsearchfr
Le 2 mai 2012 à 11:53, haiyun zhang haiyun.document@gmail.com a écrit :
thanks,
curl -XPUT '127.0.0.1:9200/mapperparsingexception/serializevalue/1' -d '{
"serializevalue": [
{
"file": 1
},
{
"file.name":"1"
}
]
}'
{"ok":true,"_index":"mapperparsingexception","_type":"serializevalue","_id":"1","_version":1}
but, I just want index array type with different core type and object type
ex:
{
"target": [
"string",
"integer",
"long",
"boolean",
{
"key": "value"
},
[
"string",
"boolean"
]
]
}
2012/5/2 David Pilato david@pilato.fr
you wrote "file.name", "1"
You should write something like "file.name": "1"
"field":"value"
HTH
David
Twitter : @dadoonet / @elasticsearchfr
Le 2 mai 2012 à 11:29, haiyun zhang haiyun.document@gmail.com a écrit :
Hi, does anyone know how to solve the following exception?
../config/default-mapping.json
{
"default " : {
}
}
curl -XPUT '127.0.0.1:9200/mapperparsingexception/serializevalue/1' -d
'{
"serializevalue": [
{
"file": 1
},
[
"file.name",
"1"
]
]
}'
{"error":"MapperParsingException[object mapping [serializevalue]
trying to serialize a value with no field associated with it, current
value [file.name]]","status":400}