Developer forum

Forum » Ecommerce - Standard features » Scoring in PLP

Scoring in PLP

Mafalda Correa
Mafalda Correa
Reply

Hi,

In my PLP, I'm sorting the products by Score and then by Name. In a normal situation, where I have no search, I expected my products to simply be ordered alphabetically, however I have a product that is jumping to the top of the list because while all products have a score of zero, this one products has a score of 0.22.

The only thing this product seems to have different from the rest of the products is that it has no Assortment ID. However, I didn't expect that to add to the scoring of the product.

This is my query:

Is it the expected behaviour that having an empty Assortment ID would increase score? But then MatchAny AssortmentID does not?

Thank you


Replies

 
Nicolai Pedersen
Reply

You can try to disable the 2 assortment related expressions and see if it affects the score.

My guess is that Assortmentids isempty could be the source of the score.

 
Mafalda Correa
Mafalda Correa
Reply

Yes, when I disable both expressions all the scores are 0.

That was my guess too based on what I was seeing, I just don't understand why the AssortmentID isEmpty would add score to the product while the other expressions don't.

 
Nicolai Pedersen
Reply

Scoring in Lucene!

Lucene searches for terms. And if a field does not have a value, it does noget get indexed for a given product. So in order to support searches like "isempty" we have to add a value to the lucene document i.e. "isempty" and then search for documents where the field is empty like assortmentids=isempty. That will give a scoring because there is an exact match on the value isempty.

So bottom line - is empty cannot be used without scoring happening. You might be able to set scoring to 0 on a custom version of the field when indexing and in that way force a 0 on this particular field.

BR Nicolai

 
Mafalda Correa
Mafalda Correa
Reply

Thank you for the explanation.

I think in this case the problem will solve itself because the product should probably have an AssortmentID, but it's good to know for future reference.

 

You must be logged in to post in the forum