Hello to everyone.
I want to create template for indexing. I don't know how to put Map<Object, Object>
(Java) in such templete.
I have right know:
PUT _template/portal-user
{
"index_patterns": "portal-user-*",
"settings": { "number_of_shards": 5 },
"mappings": {
"logs_info": {
"properties": {
"userLogin": {"type": "keyword"},
"localStorage": {"type": "keyword"},
"cookies": {"type": "keyword"},
"timeSignIn": {"type": "date"},
"cookieEnabled": {"type": "boolean"},
"deviceMemory": {"type": "integer"},
"geolocation": {"type": "geo_point"},
"hardwareConcurrency": {"type": "integer"},
"language": {"type": "keyword"},
"languages": {"type": "nested"},
"platform": {"type": "keyword"},
"userAgent": {"type": "keyword"},
"window":{"type": "keyword"},
"origin": {"type": "keyword"}
}
}
}
}
where window
and localStorage
have to be a map Map<String, Integer> window
and Map<String, String> localStorage
. I know that for an arrays of objects it hava to be nesnted
and I did it in my example "languages": {"type": "nested"}
. But I don't know what it should be for maps.