Specifying term vectors at document insertion time?


(Greg Lindahl) #1

I'm building a search engine for which I already know the weights of every term. I'd like to be able to specify these weights at document insertion time, replacing TF-IDF. Is it possible to overwrite the term_vector?

Surfing around I see solutions using payloads, but those also need a function_score & are slow.


(Greg Lindahl) #2

I ended up using the delimited payload token filter example from here:

combined with limiting the script to a rescore, for performance reasons. This is a lot harder than it ought to be! The completion suggester is a good existing example of how to allow easy specification of ranking info in Elastic.


(system) #3