algolia / algoliasearch-magento-2-es-compatibility

Algolia Search ES Compatibility module for Magento 2 >=2.3.1 || >=2.2.8
Other
0 stars 6 forks source link

Fix Bad Request Warning and Builder Aggregation #6

Closed bsuravech closed 4 years ago

bsuravech commented 4 years ago

Issue Instantsearch enabled on category pages, when reloaded with a parameter set from instantsearch facets like ?color=Blue, elasticsearch will throw a bad request error as it cannot retrieve the query correctly. Need to translate the values over to their optionID to get this to work.

Result Created a plugin for Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection::addFieldToFilter() method to change the option label value to the option ID. Also added a builder to pass facets from Algolia into the aggregator for the replaced buckets.