Wrong result for date facets

Created on 23 June 2023, over 1 year ago
Updated 26 June 2023, over 1 year ago

We came into the problem of the connector returning wrong results on the date facet we are using.

The problem started appearing when we exceeded the 10000 different contents that is the limit of elastic.

Our solution, was to alter the addFacets function to take into consideration the ‘searchApiDate’ query type, then setting the correct granularity, and creating a ‘DateHistogram’ aggregation instead of the ‘Term’ one.
With that solution, we also solved the problem of elastic connector, not returning correct results for the ‘stats’ query type too.

Attached are the screenshots for before and after the fix, as well as the diff.

🐛 Bug report
Status

Needs review

Component

Code

Created by

🇬🇷Greece Dimitris.T

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024