This doubt is regarding how POST update operation has to work,
a) Create a document as following
POST http://slc11zix.us.oracle.com:9200/students/documentType/s1
{
"Name": "student1",
"school": "school",
"EmailAddress": "student1@school.com"
}
b) Now update the same as following
POST http://slc11zix.us.oracle.com:9200/students/documentType/s1/_update
{
"doc":{
"Name": "student2",
"school": "school",
"city":"hyderabad"
}
}
**c) Following is the state of document , **shouldn't the EmailAddress be removed since the second update did not have it ?
GET http://slc11zix.us.oracle.com:9200/students/documentType/s1
{
"_index": "students",
"_type": "documentType",
"_id": "s1",
"_version": 2,
"found": true,
"_source": {
"Name": "student2",
"school": "school",
"EmailAddress": "student1@school.com",
"city": "hyderabad"
}
}
What i am expecting is "EmailAddress" is removed since second update did not have it.
Is there a issue in the Operation type used ?