-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
buckets_path cannot route through nested aggregation? #29287
Comments
Pinging @elastic/es-search-aggs |
@webbnh There is a bug here, but the bug is that we should be catching the problem at parsing time instead of when we try to run the pipeline aggregation and output a much better error. The problem is that the request is trying to run the bucket_selector aggregation on the nested aggregation which is a single bucket aggregation and the
One unrelated thing to note is that your |
@colings86, thanks for the quick reply! Your suggestion has a duplicate I ran across #14600 looking for other reports of the problem I was encountering, but with your suggested change I'm not hitting the problem reported there. (I can't tell yet whether the query is actually working properly, as I don't have enough data in the new format yet, but my corrected query is producing values and no errors...so that seems positive! ;-) ) Thanks again for your help! |
@webbnh ok, glad its working for you. I'll leave this issue open to fix the validation problem so that a more clear error is returned at parsing time. |
Hi Team, "aggs": { the error I am receiving is: { |
@biji-padhy Known limitation, unfortunately. See: #14600 Usually you can get around this by using a |
The plan is still to address the problem described in the description of this issue by catching the problem at parse time and returning a meaningful error (instead of letting the class cast error happen at execution time). Just like Colin has described in his comment.
@biji-padhy This is another issue than is described in the description of the issue. But I agree it is similar. This relates to #90076 also and once this issue has been addressed then that should fix the class cast exception that you've reported. |
Elasticsearch version (
bin/elasticsearch --version
):Plugins installed: []
None?
JVM version (
java -version
):OS version (
uname -a
if on a Unix-like system):Description of the problem including expected versus actual behavior:
The idea is to pick out a bunch of documents from the index which have interesting data in a few of their fields (I've removed some of the fields from the below for simplicity), organize those documents by the contents of the
sourceId
field, and then discard buckets which are empty or otherwise drawn from data which doesn't match.I had a query similar to the below which worked. I then modified the document structure such that most of the interesting data moved to a
nested
mapping. Attempting to modify the query to match results in an error:I tried several variations on the theme, and the commonality seems to be that a
buckets_path
cannot route through anested
aggregation.New query:
Steps to reproduce:
I'm willing to go scrape this together, but first I'd like confirmation that (a) it's not a fault in my query and (b) it's not just an implementation restriction.
Thanks!
The text was updated successfully, but these errors were encountered: