lucene - Weighted keywords on elasticsearch document -


i want create index in elasticsearch has field of weighted keywords list, when search term in keywords - give better scores documents has key higher weight?

for instance:

doc1

"id" : "111" "keywords" : "house"(20), "dog"(2)

doc2

"id" : "222" "keywords" : "house"(3), "dog"(40)

i want when searching "dog" doc2 higher score.

how build mapping , query?

note it's different searching regular boost, boost per each term different per document.

what elasticsearch payloads? see drtech's answer delimited payload token filter separate unrelated question might out. but, describing seems lend use of payloads , using script scoring access these payloads , influence scoring. take note of performance cost mentions.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -