vtex-apps/search-result

Sort Issues ( Best Discount & Price )

Closed this issue · 3 comments

Describe the bug
Hello. We have 2 problems with sorting on the website https://distinctive.ro

1. Order by Price DESC
Everything works correctly on the category page (ex: https://www.distinctive.ro/Femei/Incaltaminte?order=OrderByPriceDESC). The ordering is done accordingly, according to the final price.

If we select a filter (Brand> Sketchers), the sorting is done according to the initial price.
URL: https://www.distinctive.ro/femei/incaltaminte/skechers?initialMap=c,c&initialQuery=femei/incaltaminte&map=category-1,category-2,brand&order=OrderByPriceDESC

2. Order By Best Discount

It also works properly on the category page
URL: https://www.distinctive.ro/Femei/Incaltaminte?order=OrderByBestDiscountDESC

If we select a filter (Brand> Sketchers), there are products that have no discount among the discount products.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://www.distinctive.ro/
  2. Select Femei > Incaltaminte
  3. Click on "Sorteaza" and select "Discount" or "Cel mai mare pret"
  4. See the results ( all good here )
  5. Select "Brand > Skechers" from filters
  6. See the results

Screenshot -> OrderByBestDiscount
BestDiscount

Screenshot -> OrderByPriceDESC
Price

Hey @khrizzcristian, thanks for the detailed report!

I've looked into it, and both of them seem not reproducible at the moment. Prices shown on the website are always the latest version, when using simulationBehaviour: default on the search components props, but the underlying pricing on the search index needs to go through the indexing queue.

That means that some small discrepancies are expected to happen on products that change prices a lot, when you change the price of a product, it enters the indexing queue but changes are reflected instantly for clients, which means that during the period the product is in the indexing queue and not successfully reindexed with the new information, sorting the product listing page will be done on stale pricing data.

We're constantly working on improving indexing speed, which will over time make this period smaller, at this moment there is no action that can be done by us or on your side, we'll keep this in mind though! I've looked a bit, but not thoroughly on the pages you sent, and they seem to be working as intended now.

Hello.
Indeed, I see that everything is functional now.

I have a question, though. This problem was reported by the client on Monday, and I still managed to reproduce it this morning.

Shouldn't indexing take less time?

Yes, indexing takes significantly less time than that. I can't say for sure what would be the issue, and that could take some investigation, which could be done via a support ticket for the Search & Personalization support team.

I'll close this issue, but thanks again for the detailed report, it helps a lot as we'll be taking better care of Github issues from now on!