Search Buckets aggregations return empty

query: {
  query_string: {
    query: 'type: message',
    analyze_wildcard: true
  }
},
size: 1000,
_source: {
  excludes: []
},
aggs: {
  user: {
    terms: {
      field: 'content.username.keyword',
      size: 1000,
      order: {
        _count: 'desc'
      }
    },
    aggs: {
      channel: {
        terms: {
          field: 'channelId.keyword',
          size: 1,
          order: {
            _term: 'desc'
          }
        },
        aggs: {
          messages: {
            terms: {
              field: 'content.message.keyword',
              size: 5,
              order: {
                _count: 'desc'
              }
            },
            aggs: {
              sentiment: {
                terms: {
                  field: 'sentimentScore',
                  size: 5,
                  order: {
                    _term: 'desc'
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

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