@lukas thanks
This is the mapping and the data
PUT appointments
{
"settings": {
"number_of_shards": "1",
"number_of_replicas": "1"
},
"mappings": {
"appointment": {
"properties": {
"AppointmentId": {
"type": "long"
},
"@timestamp": {
"type": "date"
},
"BookedByUser": {
"properties": {
"FirstName": {
"type": "keyword"
},
"LastName": {
"type": "keyword"
},
"Username": {
"type": "keyword"
},
"FullName": {
"type": "keyword"
}
}
},
"AppointmentDate": {
"type": "date",
"format": "dd-MM-yyyy"
},
"Status": {
"type": "keyword"
}
}
}
}
}
PUT appointments/appointment/1001
{
"AppointmentId": 1001,
"@timestamp": "2019-03-20T15:00",
"BookedByUser": {
"Username": "john@doe.com",
"FirstName": "John",
"FullName": "John Doe",
"LastName": "Doe"
},
"AppointmentDate": "20-03-2019",
"Status": "BOOKED"
}
PUT appointments/appointment/1002
{
"AppointmentId": 1002,
"@timestamp": "2019-03-22T15:00",
"BookedByUser": {
"Username": "john@doe.com",
"FirstName": "John",
"FullName": "John Doe",
"LastName": "Doe"
},
"AppointmentDate": "23-02-2019",
"Status": "BOOKED"
}
PUT appointments/appointment/1003
{
"AppointmentId": 1003,
"@timestamp": "2019-03-23T15:00",
"BookedByUser": {
"Username": "john@doe.com",
"FirstName": "John",
"FullName": "John Doe",
"LastName": "Doe"
},
"AppointmentDate": "23-03-2019",
"Status": "BOOKED"
}
PUT appointments/appointment/1004
{
"AppointmentId": 1004,
"@timestamp": "2019-03-23T15:00",
"BookedByUser": {
"Username": "jane@doe.com",
"FirstName": "Jane",
"FullName": "Jane Doe",
"LastName": "Doe"
},
"AppointmentDate": "23-03-2019",
"Status": "BOOKED"
}
PUT appointments/appointment/1004
{
"AppointmentId": 1005,
"@timestamp": "2019-03-25T15:00",
"BookedByUser": {
"Username": "jane@doe.com",
"FirstName": "Jane",
"FullName": "Jane Doe",
"LastName": "Doe"
},
"AppointmentDate": "25-03-2019",
"Status": "BOOKED"
}