[hibernate-issues] [JIRA] (HSEARCH-3893) Elasticsearch aggregations return the count of nested (leaf) documents

Yoann Rodière (JIRA) jira at hibernate.atlassian.net
Wed Apr 15 10:01:19 EDT 2020


Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A58fa1ced-171a-4c00-97e8-5d70d442cc4b ) *created* an issue

Hibernate Search ( https://hibernate.atlassian.net/browse/HSEARCH?atlOrigin=eyJpIjoiMzUzMzA2M2VkYmNhNDcxOGFhNmU3NTU0ZjNjNDFkOWIiLCJwIjoiaiJ9 ) / Bug ( https://hibernate.atlassian.net/browse/HSEARCH-3893?atlOrigin=eyJpIjoiMzUzMzA2M2VkYmNhNDcxOGFhNmU3NTU0ZjNjNDFkOWIiLCJwIjoiaiJ9 ) HSEARCH-3893 ( https://hibernate.atlassian.net/browse/HSEARCH-3893?atlOrigin=eyJpIjoiMzUzMzA2M2VkYmNhNDcxOGFhNmU3NTU0ZjNjNDFkOWIiLCJwIjoiaiJ9 ) Elasticsearch aggregations return the count of nested (leaf) documents ( https://hibernate.atlassian.net/browse/HSEARCH-3893?atlOrigin=eyJpIjoiMzUzMzA2M2VkYmNhNDcxOGFhNmU3NTU0ZjNjNDFkOWIiLCJwIjoiaiJ9 )

Issue Type: Bug Assignee: Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A58fa1ced-171a-4c00-97e8-5d70d442cc4b ) Components: backend-elasticsearch Created: 15/Apr/2020 07:01 AM Fix Versions: 6.0.0.Beta-backlog-high-priority Priority: Major Reporter: Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A58fa1ced-171a-4c00-97e8-5d70d442cc4b )

For example, with this document:

{
   "object" : [{
        "myField" : 1
   },
   {
       "myField" : 1
   }]
}

If we run a "terms" aggregation on field "object.myField":

* If "object" is flattened, the document will contribute for 1 in the count of documents with value "1".
* If "object" is nested, the document will contribute for 2 in the count of documents with value "1".

One would expect the document to count as one in either case, since users don't specify nesting explicitly when they define aggregations: it's all just inferred and added automatically.

( https://hibernate.atlassian.net/browse/HSEARCH-3893#add-comment?atlOrigin=eyJpIjoiMzUzMzA2M2VkYmNhNDcxOGFhNmU3NTU0ZjNjNDFkOWIiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HSEARCH-3893#add-comment?atlOrigin=eyJpIjoiMzUzMzA2M2VkYmNhNDcxOGFhNmU3NTU0ZjNjNDFkOWIiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100124- sha1:fb83546 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200415/db2f1391/attachment.html 


More information about the hibernate-issues mailing list