I am new to Elasticsearch, and I am trying to find a way to have an analogy with Oracle / SQL culture :
- Create table.
- insert records.
- update a record.
- select a record
...etc
my current example is so simple:
PUT /ettalhi-explicit-idx
{
"mappings": {
"properties": {
"ettalhi-fld-age": { "type": "integer" },
"ettalhi-fld-email": { "type": "keyword" },
"ettalhi-fld-name": { "type": "text" }
}
}
}
GET ettalhi-explicit-idx/_mapping/
PUT /ettalhi-explicit-idx/_mapping
{
"properties": {
"ettalhi-fld-employee-id": {
"type": "keyword",
"index": false
}
}
}
GET /ettalhi-explicit-idx/_mapping/field/ettalhi-fld-employee-id
POST /ettalhi-explicit-idx/_doc/2
{
"ettalhi-fld-age": "48",
"ettalhi-fld-email": "ettalhi02@gmail.com",
"ettalhi-fld-name": "Noureddine Ettalhi 04",
"ettalhi-fld-employee-id": "s6486679"
}
GET /ettalhi-explicit-idx/_doc/2
Result of the last request is =
{
"_index": "ettalhi-explicit-idx",
"_id": "2",
"_version": 4,
"_seq_no": 4,
"_primary_term": 1,
"found": true,
"_source": {
"ettalhi-fld-age": "48",
"ettalhi-fld-email": "ettalhi02@gmail.com",
"ettalhi-fld-name": "Noureddine Ettalhi 04",
"ettalhi-fld-employee-id": "s6486679"
}
}
The question is :
How can I add a new line (record) to the doc(2) ?
What is wrong in this question ?
Thanks