# Hibernate Search 6 - Boost notion

**URL:** <https://discourse.hibernate.org/t/hibernate-search-6-boost-notion/3186>\
**Category:** Hibernate Search\
**Created:** [September 4, 2019, 3:25pm UTC](https://discourse.hibernate.org/t/hibernate-search-6-boost-notion/3186 "2019-09-04T15:25:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexis\_Cucumel](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/alexis_cucumel/32/687_2.png) [@Alexis\_Cucumel](https://discourse.hibernate.org/u/Alexis_Cucumel)\
**Post date:** [September 4, 2019, 3:25pm UTC](https://discourse.hibernate.org/t/hibernate-search-6-boost-notion/3186/1 "2019-09-04T15:25:14Z")

</div>

Hello,

i would like to use boost in HS6 but i don’t find anything in documentation like this [https://docs.jboss.org/hibernate/search/5.11/reference/en-US/html\_single/#section-boosting](https://docs.jboss.org/hibernate/search/5.11/reference/en-US/html_single/#section-boosting) in 5.11

thx 😉

---

<div class="post-metadata">

**Author:** ![yrodiere](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/yrodiere/32/1760_2.png) [@yrodiere](https://discourse.hibernate.org/u/yrodiere)\
**Post date:** [September 4, 2019, 3:32pm UTC](https://discourse.hibernate.org/t/hibernate-search-6-boost-notion/3186/2 "2019-09-04T15:32:01Z")

</div>

Index-time boosting was deprecated a long time ago in Lucene and removed (I think?) in recent versions of Lucene, so it’s been removed from Hibernate Search as well.

You can use query-time boosting, just like in Hibernate Search 5, like this:

```auto
SearchResult<Book> query = searchSession.search( Book.class )
		.predicate( f -> f.bool()
				.should( f.match().onField( "someField" )
						.matching( "some value" )
						.boostedTo( 2.0f ) )
				.should( f.match().onField( "someOtherField" )
						.matching( "some other value" ) )
		)
		.fetch( 20 );

```

Or in the case of a multi-field predicate, like this:

```auto
SearchResult<Book> query = searchSession.search( Book.class )
		.predicate( f -> f.match()
				.onField( "someField" ).boostedTo( 2.0f )
				.orField( "someOtherField" )
				.matching( "some value" ) )
		.fetch( 20 );

```

---

<div class="post-metadata">

**Author:** ![Alexis\_Cucumel](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/alexis_cucumel/32/687_2.png) [@Alexis\_Cucumel](https://discourse.hibernate.org/u/Alexis_Cucumel)\
**Post date:** [September 4, 2019, 3:36pm UTC](https://discourse.hibernate.org/t/hibernate-search-6-boost-notion/3186/3 "2019-09-04T15:36:27Z")

</div>

oh my bad, i didn’t knew the deprecation ! thanks for the answer
