I have a .NET object type of Dictionary<string, string> customData {get; set; }
Let's say it's a dictionary of some values like:
{
"key1", "value1",
"key2", "value2"
}
if the .NET property name is "customData" it would map it to something like customData.key1
and the value would be set to value1
. By default that is auto mapped into Text
type with a field keyword
. Is there a way to map it so that the actual value of the dictionary entry is stored as Keyword? I want the customData.key1
to hold a Keyword type value as opposed to it being Text with a backing field of Keyword type. I want to access the keyword field directly from customData.key1
instead of customData.key1.keyword
.
Trying to avoid using .keyword like this:
Ideas?
I tried this:
"customData": {
"type": "object",
"properties": {
"item": {
"type": "keyword"
},
"keys": {
"type": "object",
"properties": {
"count": {
"type": "integer"
}
}
},
"values": {
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"item": {
"type": "keyword"
}
}
},
"count": {
"type": "integer"
},
"comparer": {
"type": "object",
"properties": {}
}
}
}