# Document relevance in search using business score

**URL:** https://discuss.elastic.co/t/document-relevance-in-search-using-business-score/24629
**Category:** Elasticsearch
**Created:** [June 30, 2015, 1:45pm UTC](https://discuss.elastic.co/t/document-relevance-in-search-using-business-score/24629 "2015-06-30T13:45:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jitensavla](https://avatars.discourse-cdn.com/v4/letter/j/e68b1a/32.png) [@jitensavla](https://discuss.elastic.co/u/jitensavla)
#### Post date: [June 30, 2015, 1:45pm UTC](https://discuss.elastic.co/t/document-relevance-in-search-using-business-score/24629/1 "2015-06-30T13:45:37Z")

</div>

We have a use case where we index people information in elastic search with different attributes like date of birth, hobbies, education etc. We want to associate a score with document based on the weight-age selected by user while firing search query.

For instance, I want all the people born in September having more relevance then October and people born in October having more relevance then August. Further I want people with Masters degree having more relevance than Bachelors degree. The final score for a person will be function of relevance score for birth month and education degree. Its like giving a business score to each search document based on the attribute weight-age selected by user.

How do we achieve this in elastic search? Is there a out of the box solution? Should we be using custom score scripts?

---

<div class="post-metadata">

### Author: ![Jason\_Wee](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jason\_Wee](https://discuss.elastic.co/u/Jason_Wee)
#### Post date: [July 1, 2015, 10:38am UTC](https://discuss.elastic.co/t/document-relevance-in-search-using-business-score/24629/2 "2015-07-01T10:38:36Z")

</div>

try this [https://www.elastic.co/guide/en/elasticsearch/reference/1.6/query-dsl-function-score-query.html](https://www.elastic.co/guide/en/elasticsearch/reference/1.6/query-dsl-function-score-query.html)

---

<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, 12:04am UTC](https://discuss.elastic.co/t/document-relevance-in-search-using-business-score/24629/3 "2017-07-06T00:04:22Z")

</div>


