# Conditional function score boost based on used search term

**URL:** <https://discuss.elastic.co/t/conditional-function-score-boost-based-on-used-search-term/216016>\
**Category:** Elasticsearch\
**Created:** [January 22, 2020, 9:23am UTC](https://discuss.elastic.co/t/conditional-function-score-boost-based-on-used-search-term/216016 "2020-01-22T09:23:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DerrickXp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/derrickxp/32/61193_2.png) [@DerrickXp](https://discuss.elastic.co/u/DerrickXp)\
**Post date:** [January 22, 2020, 9:23am UTC](https://discuss.elastic.co/t/conditional-function-score-boost-based-on-used-search-term/216016/1 "2020-01-22T09:23:46Z")

</div>

I have client that requested a feature to apply certain boosts only when a certain search term is used. My first thought is that this should not be necessary with the right configuration and doc content. But after a demo of a view cases i can see why the client asks for this feature.

My escape is to implement this feature at query build time but i'm wondering what the best practice within Elasticsearch is.

---

<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:** [February 19, 2020, 9:35am UTC](https://discuss.elastic.co/t/conditional-function-score-boost-based-on-used-search-term/216016/2 "2020-02-19T09:35:03Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
