cancel
Showing results for 
Search instead for 
Did you mean: 

Solr Score - SAP Hybris

0 Kudos

I have a problem with the score when doing the search, the search word is milka which has an enhancer of 100 in the description field, but when listing it brings me the first 2 results, the third gives me NIVEA BODY MILK 400 ML which has nothing from Milka and the following ones (4th, 5th, etc.) if you bring with the word milka, is there some kind of configuration or something you have to do about it. It should be noted that the first 5 have the same score. I will appreciate any help.

First result

Second result

Third result

fourth result

Debug Query:

adiputera
Active Participant
0 Kudos

I believe that is because solr is using fuzzy search, you can try to change the field type to string instead of text if you always want to get exact word

0 Kudos

Thank you very much for the response, I will tell you that I made the respective change and indexed again, I do not have favorable results, there is something else where I must do some type of configuration.

Accepted Solutions (0)

Answers (1)

Answers (1)

MariusKallhardt
Explorer
0 Kudos

You are querying Solr directly, so there is no fuzzy search applied yet, you're only applying a boost of 100.0 to the term milka.

However, check the debug output: line 1 is your query and line 3 "parsedquery" is the query parsed to Lucene. Your query term has been reduced to only "milk". I cannot tell why the term is parsed like that.

Maybe try with "milka" (in quotes) or even "*milka*".

Thank you very much for the answer, in line 3 it is a parsing of solr itself, it seems to me that it is a native configuration, do you have any idea where I can continue testing.

MariusKallhardt
Explorer
0 Kudos

I'm sorry, I had noticed similar problems (?) with the Lucene parser myself, but could not find details...
If you are investigating bad search results in SAP Commerce, have a look at the Free Text Query setting of the SolrIndexedProperty for "description".

Directly in Solr, try querying with quotes or wildcards:

description_text_pt:"milka"^100.0
description_text_pt:*milka*^100.0