-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Double sorting with aggregation not working #5120
Comments
{
"query": "*",
"max_hits": 0,
"aggs": {
"comment_ranking_avg": {
"terms": {
"field": "comment_ranking",
"size": 20,
"order": {
"avg_field": "desc",
"_key": "desc"
}
},
"aggs": {
"avg_field": {
"avg": {
"field": "author_comment_count"
}
}
}
}
}
} This is not a correct way to define the order. It should be: "order": [ { "avg_field": "desc" }, { "_key":"desc" } ] But currently this is not supported, only sort by one field is supported currently. |
Provided order is not working also, but it's still not implemented
So with an order by one key, it works fine and gives the same results each call. Probably you just should notice somewhere in docs that you support now only one argument for sorting. |
There's also quickwit-oss/tantivy#2451 But it's just covering error handling, not implementing order by multiple fields |
Describe the bug
When we request collection with aggregation with sorting by two fields we see two bugs:
Steps to reproduce (if applicable)
quickwit/quickwit:0.8.1
PS: Sometimes it returns results without grouping. In that case you should reindex your dataset
So generally we can get 3 different results for one query.
PS: Elasticsearch compatible URL has the same behaviour
Expected behavior
It should return the dataset like provided below
Configuration:
Please provide:
quickwit --version
The text was updated successfully, but these errors were encountered: