[source, ruby]
----
response = client.search(
  body: {
    aggregations: {
      genres: {
        rare_terms: {
          field: 'genre',
          include: 'swi*',
          exclude: 'electro*'
        }
      }
    }
  }
)
puts response
----
