Hi,
Is there a way to categorize similar values of specific field, during the query time ?
for example, suppose I have these documents:
- {..., message: "this is message no 1",...}
- {..., message: "this is message no 2",...}
- {..., message: "the message: 'very long message' is too long",...}
my goal is to aggregate the message not by term, but by pattern, so for the given example I expect the result to be something like this, not necessarily the exact same:
{
buckets: [
{
key: 'message: "this is message no 1"',
pattern: ''this is message no"
},
{
key: 'message: "the message: 'very long message' is too long"',
pattern: 'the message: is too long'
}
]
}