Categorizing similar values


Is there a way to categorize similar values of specific field, during the query time ?

for example, suppose I have these documents:

  1. {..., message: "this is message no 1",...}
  2. {..., message: "this is message no 2",...}
  3. {..., 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'

Hi Omar.
See this post

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