Posted on 09/11/2020 10:36:01
Hi Umar
Your free text is probably a summary field where you use "contains" as an operator. Lucene cannot score using contains - you have to use an other operator, see this thread:
https://doc.dynamicweb.com/forum/ecommerce-standard-features/ecommerce-standard-features/control-scoring-of-keywords-in-search-results
So if you have a parameter "q" and your search looks like this:
No scoring will take place. That is a limitation of Lucene.
You can then do like this:
-
OR group
-
summary <contains> q
-
pagetitle <equals> q
The equals will trigger scoring. The pagetitle field will have to be analyzed so that a pagetitle named "word1 word2" becomes two terms in the index, "word1" and "word2". If you search for pagetitle <equals> 'word1' it will find a result and add scoring. If you search for 'word' instead, the summary <contains> 'word' will ensure the result is returned - but there is no scoring because the pagetitle <equals> 'word' does not trigger a hit.
BR Nicolai