Sorting by price on B2B site returns zero results, but works on B2C site

We have found ourself in a strange situation where filtering on price (and only price) in productlist pages and searchpages results in zero results back. It only happens on the B2B-site and I currently can’t replicate it locally.

So my guess is that it is some setting that is messing with us, but I can’t find which it might be. Does anyone here have any clues?

Litium version: 7.1.0

I have started to check that the user that you are testing with will get any assigned price lists. If the user not is getting any price lists it does not exists any data to sort on.

I have tried with both a pricelist that would be defallt for the site, and also a pricelist that is pointed towards the organization, and neither worked.

If you remove the sorting, is there any product visible then?

Sorting of prices should not have impact of the search result itself expect the order.

Yepp!

I also realize that the sorting should not have an impact on the actual result. But from what I can see in the logs, the Hit count is 0.
EDIT: Not 0, i was reading the wrong log. The resulting hits are 126. But for some reason the frontend is still showing the “No Results” message

Make a breakpoint in Litium.Accelerator.Search.ProductSearchServiceImpl.FilterAndSortOnPrice and you will probably see that the items will contain all the hit but the rQuery will be empty.

If that is the case the search is not able to fetch the price-tags and is the part that need to be investigated In that case you should start in Litium.Accelerator.Search.Filtering.PriceFilterService and see that it will return all the price tags that is needed.

Seems like all the prices is “-1”. Which is strange, because that is not what prices are set or shown without the price sorting.

If you check how the response is build inside the Search method you can see that it will return -1 if no price lists are found as tags.

Check the PriceFilterService to see that it return the correct tags, after that you can use the tool luke (java) to open the index and see if the prices are indexed as they should.

PriceFilterService seems to use the correct tags.

I would not know how prices would look in lucene if they were indexed “as they should”.
Do you have any examples?

EDIT: From what I can see, it seems as though only the very first pricelist that was created has been indexed by lucene.