I am getting error when running the following command. I am a noob please help me.
command :
PUT /companydatabase?pretty { "mappings": { "employees": { "properties": { "FirstName": { "type": "text" }, "LastName": { "type": "text" }, "Designation": { "type": "text" }, "Salary": { "type": "integer" }, "DateOfJoining": { "type": "date", "format": "yyyy-MM-dd" }, "Address": { "type": "text" }, "Gender": { "type": "text" }, "Age": { "type": "integer" }, "MaritalStatus": { "type": "text" }, "Interests": { "type": "text" } } } } }
The error :
{ "error" : { "root_cause" : [ { "type" : "mapper_parsing_exception", "reason" : "Root mapping definition has unsupported parameters: [employees : {properties={Designation={type=text}, Salary={type=integer}, MaritalStatus={type=text}, DateOfJoining={format=yyyy-MM-dd, type=date}, Address={type=text}, FirstName={type=text}, LastName={type=text}, Gender={type=text}, Age={type=integer}, Interests={type=text}}}]" } ], "type" : "mapper_parsing_exception", "reason" : "Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters: [employees : {properties={Designation={type=text}, Salary={type=integer}, MaritalStatus={type=text}, DateOfJoining={format=yyyy-MM-dd, type=date}, Address={type=text}, FirstName={type=text}, LastName={type=text}, Gender={type=text}, Age={type=integer}, Interests={type=text}}}]", "caused_by" : { "type" : "mapper_parsing_exception", "reason" : "Root mapping definition has unsupported parameters: [employees : {properties={Designation={type=text}, Salary={type=integer}, MaritalStatus={type=text}, DateOfJoining={format=yyyy-MM-dd, type=date}, Address={type=text}, FirstName={type=text}, LastName={type=text}, Gender={type=text}, Age={type=integer}, Interests={type=text}}}]" } }, "status" : 400 }