I have userid, name and type variables as int, string and arraylist in Java respectively. I want to insert it into the elasticsearch database like this :-
users
{
"userid": 5,
"name": "test",
"type": ["U1", "U2"]
}
1) How can I achieve this using Java client(high level API)?
2) How can I append to the "type" field(assuming it exists)?
example: I want to add "U3" to the "type" field so it becomes like this
users
{
"userid": 5,
"name": "test",
"type": ["U1", "U2", "U3"]
}