For an e-commerce store I have two products like these indexed in Solr
Now, for a search query "Canon EOS 80D", I am getting product ranked as 1,2 as a result.
How can I rank Product 2, which is "Canon EOS 80D DSLR Camera with 18-135mm Lens" rank first?
Basically, I want to give more boost/weight-age to the product that has term in the beginning of the name phrase compared to those product that has same term not the first in the name phrase.
Pls advise.
I strongly advice not to use the token positions to boost your product over accessories. Imagine a customer is searching for "EOS 80D" - he will still get the silicone cover on first position.
A better solution would be to boost on a secondary field. Some ideas:
bf=log(price)
bq=category:product
I know that this answer is not a direct solution for the original question - but sometimes there are much simpler solutions for a problem if you look at it from a distance.