I'm trying to change an elasticsearch field to nested, I'm having problems with the command to do this. I'm not sure if it's because it's a couple of fields down that is giving me grief.
Here's what I'm trying to input:
curl -XPUT 'http://localhost:9200/_mapping/data' -d '
{
"data" : {
"properties" : {
"parsed" : {
"properties" : {
"PMSetup" : {
"properties" : {
"Result" : {
"type" : "nested"
"include_in_parent" : true
},
}
}
}
}
}
}
}
'
Can anyone help with this?
Thanks!
The nested type is a specialised version of the object data type that allows arrays of objects to be indexed in a way that they can be queried independently of each other.
You can disable dynamic mapping, both at the document and at the object level. Setting the dynamic parameter to false ignores new fields, and strict rejects the document if Elasticsearch encounters an unknown field. Use the update mapping API to update the dynamic setting on existing fields.
When a packed class contains an instance field that is a packed type, the data for that field is packed directly into the containing class. The field is known as a nested field .
Mapping cannot be updated for existing fields. The only thing you can do is DELETE
your index and then PUT
it back and POST
mapping all over again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With