// GET /review-queue/_search
{
  "from": 0,
  "size": 100,
  "sort": [
    {
      "sale_start_date": {
        "order": "desc"
      }
    }
  ],
  "aggs": {
    "account_id": {
      "terms": {
        "field": "account_id.keyword",
        "order": {
          "_count": "desc"
        },
        "size": 20000
      },
      "aggs": {
        "docs": {
          "top_hits": {
            "size": 1,
            "_source": [
              "account_id",
              "account_name"
            ]
          }
        }
      }
    },
    "metadataLanguageCode": {
      "terms": {
        "field": "metadata_language_code.keyword",
        "order": {
          "_count": "desc"
        },
        "size": 20000
      },
      "aggs": {
        "docs": {
          "top_hits": {
            "size": 1,
            "_source": [
              "metadata_language_code",
              "metadata_language_name"
            ]
          }
        }
      }
    },
    "productStatus": {
      "terms": {
        "field": "product_status.keyword",
        "order": {
          "_count": "desc"
        },
        "size": 20000
      },
      "aggs": {
        "docs": {
          "top_hits": {
            "size": 1,
            "_source": [
              "product_status"
            ]
          }
        }
      }
    },
    "notices.code": {
      "terms": {
        "field": "notices.code",
        "order": {
          "_count": "desc"
        },
        "size": 20000
      },
      "aggs": {
        "docs": {
          "top_hits": {
            "size": 1,
            "_source": [
              "notices.code",
              "notices.level"
            ]
          }
        }
      }
    }
  },
  "query": {
    "bool": {
      "must": [
        {
          "match": {
            "account_id.keyword": "30733:0"
          }
        },
        // {
        //   "match": {
        //     "product_status.keyword": "Update"
        //   }
        // },
        // {
        //   "match": {
        //     "metadata_language_code.keyword": "MKD"
        //   }
        // },
        // {
        //   "match": {
        //     "configuration.keyword": "Physical"
        //   }
        // },
        {
          "multi_match": {
            "query": "Anth",
            "fields": [
              "account_name.keyword",
              "upc.keyword",
              "product_name.keyword",
              "primary_artist.keyword"
            ],
            "type": "bool_prefix",
            "fuzziness": "AUTO"
          }
        }
      ]
    }
  }
}
