• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Elasticsearch multi match exact match boosting

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

We use spring data elastic search.
We use multimatch query to search against multiple fields.




We use PHRASE_PREFIX for phrase match.

Now, we would like to add boosting for exact match on nickName( boosting only if exact match ).

For example, when i search for Baskar, if there is a exact match on nickName, it should be ordered first in the result. If there is no exact match, then firstName should be given boosting. I tried boosting like below.





Boosting doesnt seem to be working. Also not sure, how to add boosting only on exact match on a field.


Thanks,
Baskar.S
 
The overall mission is to change the world. When you've done that, then you can read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic