# Learning optimal boost weight \[ML\]

**URL:** https://discuss.elastic.co/t/learning-optimal-boost-weight-ml/19625
**Category:** Elasticsearch
**Created:** [September 4, 2014, 3:16pm UTC](https://discuss.elastic.co/t/learning-optimal-boost-weight-ml/19625 "2014-09-04T15:16:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![nicom](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nicom/32/488_2.png) [@nicom](https://discuss.elastic.co/u/nicom)
#### Post date: [September 4, 2014, 3:16pm UTC](https://discuss.elastic.co/t/learning-optimal-boost-weight-ml/19625/1 "2014-09-04T15:16:16Z")

</div>

Hi,

i have several fields playing in the query.

some fields are more important than other , requiring to set boost factors.

I would like to automatically learn the optimal boost weight for each field  
based on a training data set.

is there a plugin or framework to do that nicely with ES?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/83314839-18cf-4ff8-88d7-e870485cb5f5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/83314839-18cf-4ff8-88d7-e870485cb5f5%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)
#### Post date: [September 4, 2014, 9:24pm UTC](https://discuss.elastic.co/t/learning-optimal-boost-weight-ml/19625/2 "2014-09-04T21:24:20Z")

</div>

I have something similar which uses search analytics to determine relevant  
filters. No plugin or framework since everything works on the client side  
during the creation of the query. The process is far from ideal and is  
currently very conservative, providing only a slight boost. It does not  
work only multiple fields, just on the different values for a single field.

For boosting, I use filtered subsets. The process works well and the boost  
is applied after Lucene scoring:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

```
     "functions": [
        {
           "filter": {
              "term": {
                 "tag": 34252366377419
              }
           },
           "boost_factor": 1.1
        }
     ]

```

Cheers,

Ivan

On Thu, Sep 4, 2014 at 8:16 AM, NM [n.maisonneuve@gmail.com](mailto:n.maisonneuve@gmail.com) wrote:

> Hi,
> 
> i have several fields playing in the query.
> 
> some fields are more important than other , requiring to set boost factors.
> 
> I would like to automatically learn the optimal boost weight for each  
> field based on a training data set.
> 
> is there a plugin or framework to do that nicely with ES?
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/83314839-18cf-4ff8-88d7-e870485cb5f5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/83314839-18cf-4ff8-88d7-e870485cb5f5%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/83314839-18cf-4ff8-88d7-e870485cb5f5%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/83314839-18cf-4ff8-88d7-e870485cb5f5%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQD7DY%3DFN%3DH%3DMsZThuo4b87X3Y6JsH-OzUPPiDtVh2116A%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQD7DY%3DFN%3DH%3DMsZThuo4b87X3Y6JsH-OzUPPiDtVh2116A%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:04am UTC](https://discuss.elastic.co/t/learning-optimal-boost-weight-ml/19625/3 "2017-07-06T01:04:15Z")

</div>


