# Boost field in the new Java API Client

**URL:** <https://discuss.elastic.co/t/boost-field-in-the-new-java-api-client/360715>\
**Category:** Elasticsearch\
**Created:** [June 3, 2024, 12:44pm UTC](https://discuss.elastic.co/t/boost-field-in-the-new-java-api-client/360715 "2024-06-03T12:44:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PodarcisMuralis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/podarcismuralis/32/122606_2.png) [@PodarcisMuralis](https://discuss.elastic.co/u/PodarcisMuralis)\
**Post date:** [June 3, 2024, 12:44pm UTC](https://discuss.elastic.co/t/boost-field-in-the-new-java-api-client/360715/1 "2024-06-03T12:44:38Z")

</div>

I am migrating old High Rest Java Api Client into Java Api Client but there are everywhere in queries of the old code, this "boost" field. I could not find out if these both fields are used in the new client by default or if we need it.

```auto
{
  "bool" : {
    "adjust_pure_negative" : true,
    "boost" : 1.0
  }
}

```

Should I remove it in the new client or should I add the boost 1 or adjust\_pure\_negative?

---

<div class="post-metadata">

**Author:** ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)\
**Post date:** [June 3, 2024, 1:33pm UTC](https://discuss.elastic.co/t/boost-field-in-the-new-java-api-client/360715/2 "2024-06-03T13:33:41Z")

</div>

Hi @PodarcisMuralis

About this: [What does "adjust\_pure\_negative" flag do?](https://discuss.elastic.co/t/what-does-adjust-pure-negative-flag-do/92348)

> [@PodarcisMuralis](#):
>
> adjust\_pure\_negative

By default the boost will be 1 but you can edit it like this:

```
  BoolQuery.of(b -> b
      .should()
      .must()
      .filter()
      .boost(10f)
  );

```
