Hi,
We're building a case management system with ES as its backend for storing case data.
One of the issues/requirements we have is the following:
The "case" type contains an object field called "file". The content of this "file" field is very dynamic, but needs to be searchable. We don't know the contents up front, so we can't make a mapping for it. Currently our mapping for the case type looks like this:
{"case": {"properties": {
"definition": {
"type": "string",
"index": "not_analyzed"
},
"file": {
"type": "object",
"enabled": false
},
"id": {
"type": "string",
"index": "not_analyzed"
},
"parentCaseId": {
"type": "string",
"index": "not_analyzed"
},
"plan": {
"type": "nested",
"properties": {"items": {
"type": "nested",
"properties": {
"caseInstanceId": {
"type": "string",
"index": "not_analyzed"
},
"currentState": {
"type": "string",
"index": "not_analyzed"
},
"historyState": {
"type": "string",
"index": "not_analyzed"
},
"id": {
"type": "string",
"index": "not_analyzed"
},
"isRepeating": {"type": "boolean"},
"isRequired": {"type": "boolean"},
"lastModified": {
"type": "string",
"index": "not_analyzed"
},
"name": {
"type": "string",
"index": "not_analyzed"
},
"stageId": {
"type": "string",
"index": "not_analyzed"
},
"transition": {
"type": "string",
"index": "not_analyzed"
},
"type": {
"type": "string",
"index": "not_analyzed"
},
"user": {
"type": "string",
"index": "not_analyzed"
}
}
}}
},
"rootCaseId": {
"type": "string",
"index": "not_analyzed"
}
}}}```
I'd like to have some advice on how to create a mapping for the file object to make it searchable, but still keep it dynamic. Each instance of a "case" document can contain a complete different content in "file"
Any help on this would be great.
Kind regards,
Danny