Reputation: 3277
For Solr search results, I'm struggling with the search term importance for a search string.
When I search for "xperia go" (note that the cart doesn't have that product, so results are either other products where in xperia or go or both appears in name), the products that appear in search results are those who have go in their name, and then after few of them appx. at around end of those products, other products with xperia in their name appears.
And when I search for "go xperia" the products with xperia in name appears earlier then products with go in their name.
So the solr is giving more importance to the second word then first word. I just want the results to be reversed. So when I search for xperia go, it should display products with xperia in their name in top positions and then show products with go in their name.
I've tried to find out what could be wrong, but unable to find the cause of this. I'm sure this is just a small config related thing. I'm looking for your answers on how to fix it.
Upvotes: 0
Views: 353
Reputation: 420
Well please try building your query like this:
xperia^2 go
I haven´t worked with it yet, so if this won´t work try
yourField:xperia^2 yourField:go
With the ^2 in the term, you will boost the searchword and gives it a higher "score". So this will be displayed first. Maybe this site will help you: http://wiki.apache.org/solr/SolrRelevancyFAQ#How_can_I_make_.22superman.22_in_the_title_field_score_higher_than_in_the_subject_field The following subjects might be interesting too.
Upvotes: 2