Feedback about scoring/filtering method


(William King) #1

Hi all,

I'm writing a plugin to implement a custom suggestion/discovery engine with
elasticsearch. In this plugin I'm loading in several native scripts to
handle searching/sorting.

My plan is to first use a "script filter" first to filter down documents
based on a relatively complex set of features (including potentially
loading in data from external sources). I then plan to cache this result
with Google Guava (built into elasticsearch), haven't decided yet how best
to handle expiry of this cached result, if at all.

Then I plan to use another native script with a "custom_score" query to
access that cached result and use it to score the document with
a separate scoring algorithm. This way I can easily switch scoring
algorithms per query but still retain the filtering method easily.

I'd love to get feedback about this method, especially curious about
potential performance pitfalls.

--


(system) #2