- Open on Drupal.org →Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - Issue created by @Dimitris.T
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.
Needs review
Code