# Feedback about scoring/filtering method

**URL:** <https://discuss.elastic.co/t/feedback-about-scoring-filtering-method/8997>\
**Category:** Elasticsearch\
**Created:** [September 11, 2012, 9:10pm UTC](https://discuss.elastic.co/t/feedback-about-scoring-filtering-method/8997 "2012-09-11T21:10:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![William\_King](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/william_king/32/2631_2.png) [@William\_King](https://discuss.elastic.co/u/William_King)\
**Post date:** [September 11, 2012, 9:10pm UTC](https://discuss.elastic.co/t/feedback-about-scoring-filtering-method/8997/1 "2012-09-11T21:10:49Z")

</div>

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.

--

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:13am UTC](https://discuss.elastic.co/t/feedback-about-scoring-filtering-method/8997/2 "2017-07-06T03:13:06Z")

</div>

Closed on July 6, 2017, 3:13am UTC


