Please help to solve the problem, my local environment 7.12 has no problem, but when I use AWS elasticsearch 7.10, this problem occurs. If 7.10 does not support MultiTermsAggregation, how can I adjust it?
var grouRequest = new SearchRequest("log_transaction")
{
Size = 0,
Query = new BoolQuery { Must = mustClauses },
Source = false,
TrackTotalHits = true,
Aggregations = new AggregationDictionary
{
{"groupbym",new MultiTermsAggregation("groupbym")
{
Terms = new List<Term>{
new Term {Field = "userName.keyword" },
new Term {Field = "gameType.keyword" },
new Term {Field = "platCode.keyword" },
},
Size=1000000,
Aggregations = new AggregationDictionary
{
{"sumbetAmount", new SumAggregation("sumbetAmount",new Field("betAmount"))},
{"sumwinAmount", new SumAggregation("sumwinAmount", new Field("winAmount"))},
{"sumeffectiveBetAmount", new SumAggregation("sumeffectiveBetAmount", new Field("effectiveBetAmount"))},
{"suminvalidBetAmount", new SumAggregation("suminvalidBetAmount", new Field("invalidBetAmount"))},
{
"bk_sort", new BucketSortAggregation("groupbym")
{
From=skip,
Size=Convert.ToInt32(model.Pagesize),
}
}
}
}
},
{
"stats_bucket",new CardinalityAggregation("state_count", "userName.keyword")
}
}
};
var groupResponse = _elclient.Search<ElTransactionModel>(grouRequest);
OriginalException: Elasticsearch.Net.ElasticsearchClientException: Request failed to execute. Call: Status code 400 from: POST /log_transaction/_search?typed_keys=true. ServerError: Type: parsing_exception Reason: "Unknown aggregation type [multi_terms] did you mean [rare_terms]?" CausedBy: "Type: named_object_not_found_exception Reason: "[1:328] unknown field [multi_terms]