# Negative weight for boolean field if true

**URL:** <https://discuss.elastic.co/t/negative-weight-for-boolean-field-if-true/46429>\
**Category:** Elasticsearch\
**Created:** [April 5, 2016, 3:50pm UTC](https://discuss.elastic.co/t/negative-weight-for-boolean-field-if-true/46429 "2016-04-05T15:50:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BenSeb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benseb/32/8714_2.png) [@BenSeb](https://discuss.elastic.co/u/BenSeb)\
**Post date:** [April 5, 2016, 3:50pm UTC](https://discuss.elastic.co/t/negative-weight-for-boolean-field-if-true/46429/1 "2016-04-05T15:50:57Z")

</div>

Hi

I'm currently using function scoring to weight our results. I'd like to perform a simple weighed downgrade on the score, if a boolean field is set to true.

I was hoping true may be interpreted at 1, but this gives an error:

```
                                ["field_value_factor" => [
                                  "field"=> "booleanfield",

                                  "modifier"=> "none",
                                    "factor" => 1

                                ]]

```

Is there any way to take this into consideration on the scoring (we dont wish to filter them out completely)

---

<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 5, 2017, 11:02pm UTC](https://discuss.elastic.co/t/negative-weight-for-boolean-field-if-true/46429/2 "2017-07-05T23:02:12Z")

</div>


