Disable date detection for already created type


(லக்ஷ்மணன் நாராயணன்) #1

Hi All,

I tried disabling date detection before a type being created dynamically but Is there a way I can disable date detection for already created type?


(sreeram) #2

No, you can't do that.


(லக்ஷ்மணன் நாராயணன்) #3

Thanks for the reply @sreeram. Is there a way i can send date as string in elastic search ?


(David Pilato) #4

Just map it as a String in the mapping before indexing the first document.


(லக்ஷ்மணன் நாராயணன்) #5

Thanks @dadoonet.

Please find my scenario below. I already have a property value of data type String. When i try to insert date for property value i am getting MergeMappingException. Hence i wanted to disable date.

Please find my mappings below. I have property called parameters which will have reference to it and hence it defines mappings recursively. For exisiting level of depth, even if i give date for values it is considering that as string, but if introduce new level I am getting error.

{
"properties": {
"parameters": {
"properties": {
"parameters": {
"properties": {
"parameters": {
"properties": {
"templateKey": {
"type": "string"
},
"values": {
"type": "string"
}
}
},
"templateKey": {
"type": "string"
},
"values": {
"type": "string"
}
}
},
"templateKey": {
"type": "string"
},
"values": {
"type": "string"
}
}
},
"templateKey": {
"type": "string"
},
"values": {
"type": "string"
}
}
}


(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.