When attempting to create a new optimizer, I was trying to move items with a special price to the bottom of a category. When I selected "Special Price", the value is treated as a string, rather than a numerical value.
Magento Version : 2.3.1
ElasticSuite Version : 2.8
Environment : Production

Hello @KholdenSP
if you plan to boost (or bury) products that are actually discounted, you'd rather use the "Only discounted product" sub-rule.
That being said, I have the same issue as yours with special price being treated as a string BUT the "Special Price" should not be used (and available) in any cases here because it is simply not indexed into the Elasticsearch server : we only have a "price" field containing either the base price, or the special price if there is one. And we have a flag "is_discount" which is set either to true or false depending the fact that a special price is existing or not.
So, if you plan to do a rule like "target all products having a special price", use the "Only discounted product" condition.
If you plan to do a rule like "target all products having a special price under 50$", use a rule on Price like "Price is less than 50" (Price attribute should be treated as a numeric).
Regards
Hello @KholdenSP
[...]
If you plan to do a rule like "target all products having a special price under 50$", use a rule on Price like "Price is less than 50" (Price attribute should be treated as a numeric).That is, use an "AND" combination ("ALL those rules ...") with both a rule on "Only discounted products" and a rule "Price is less than 50".
Makes a ton of sense. If the attribute is not indexed, what's the point of keeping it in the optimizer selection? Are any others in the list not actually indexed?
Nope, if an attribute is shown here, it's indexed and available for rules.
Only price & special_price do have this kind of "strange" things embedded.
Regards
Thanks a lot.
Most helpful comment