We have a problem with our price filter. We are using magento 2.2.6 and Smile-SA/elasticsuite 2.6.x-dev.
When I go to a category and set a price range filter 0-0,99 I get results with a higher price. The URL looks like: /baelle/?price=0-1
When I query the ElasticSearch manually for one of the given SKUs the price looks always as the following for all customer groups:
price: [
{
price: "0.0000",
original_price: "79.9500",
is_discount: true,
customer_group_id: "0"
}
],
In the backend the product is configured with a price of 79.95 and no advanced pricing. In the catalog__product_index_price table it's stored like this:
But when I set special_price in the backend the price in ElasticSearch changes to the according special_price. Similar to the entries in catalog_product_index_price it looks now like this:
All of this happens to configurable and simple products alike and we have no idea where or what the problem could be.
Any ideas why the price filter is not working as expected?
Update
I figured out we have some products where the indexer is working as expected but for the majority it is not. \Catalog\Model\ResourceModel\Product\Indexer\Price\DefaultPrice::prepareFinalPriceDataForType()
Is not beeing called either way.
I executed php bin/magento dev:tests:run unit
to see if maybe an test for the indexer is failing but only one test failed and it has nothing to do with the indexer.
I tried to find a pattern which products are working as expected and which don't but I had no luck with it.
Update 2
I started to disable all third party modules. After disabling all, clearing all caches and executing bin/magento setup:di:compile
there is still no difference.
Update 3
I have tried to run the dev/tests/integration/testsuite/Magento/Catalog/Model/Indexer/Product/Price
integrations tests in order to figure out some more details but the tests fail straight away with the following error:
Error in fixture: "dev/tests/integration/testsuite/Magento/Catalog/_files/product_simple.php". Unable to save Stock Item
Could this error lead into a wrong index?