You are looking at documentation for an older release.
Not what you want? See the
current release documentation.
Custom Boost Factor Queryedit
QueryBuilders.customBoostFactorQuery(QueryBuilders.matchAllQuery()) // Your query
.boostFactor(3.1f);