Hi.
We are using Lucene 5.5.5 where setBoost is deprecated for all Query types.
How to set the boost of a NumericRangeQuery while preserving the
NumericRangeQuery type?
BoostQuery doesn't allow this and I haven't found a way.
Thanks for your help.
Claude Lepère
Hello Claude,
Wrap it by BoostQuery. see https://lucene.apache.org/core/6_0_0/MIGRATE.html
On Sat, Nov 25, 2023 at 2:46 PM Claude Lepère
wrote:
> Hi.
>
> We are using Lucene 5.5.5 where setBoost is deprecated for all Query types.
> How to set the boost of a NumericRangeQuery while preserving th
Hello Mikhail.
Sorry if I was not precise enough.
A NumericRangeQuery can be wrapped in a BooleanQuery with a boost but this
boost is applied to the BoostQuery (a Query) not to the wrapped
NumericRangeQuery.
Casting BoostQuery or Query to NumericRangeQuery is impossible and
BoostQuery.getQuery ret