lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <>
Subject RE: Replacement for Filter-as-abstract-class in Lucene 5.4?
Date Fri, 15 Jan 2016 08:27:30 GMT
I had the same problem while migrating old code. Filter is very convenient to use, so why is
it deprecated? I agree we should convert all internal filters to use this, but people from
the outside, that just quickly want to create a Filter based on simple stuff like bitsets,
should get an easy api without multi-pass stuff or the need to implement a full scorer returning
0 as score.

So I tend to rename the current filter class as BaseNonScoringQuery. In 5.x keep Filter deprecated
(maybe simply as empty abstract subclass of this one).


Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen

> -----Original Message-----
> From: Trejkaz []
> Sent: Friday, January 15, 2016 1:52 AM
> To: Lucene Users Mailing List <>
> Subject: Fwd: Replacement for Filter-as-abstract-class in Lucene 5.4?
> Hi all.
> Filter is now deprecated, which I already knew was in the pipeline.
> The docs say:
>    "Use Query objects instead: when queries are wrapped in a
>     ConstantScoreQuery or in a BooleanClause.Occur.FILTER clause,
>     they automatically disable the score computation so the Filter
>     class does not provide benefits compared to queries anymore."
> That's fair enough and an easy change to do on the caller side.
> The other thing we are using Filter for is the other thing it mentions
> in the Javadoc:
>    "Convenient base class for building queries that only perform
>     matching, but no scoring. The scorer produced by such queries
>     always returns 0 as score."
> What is the new convenient way to implement your own queries that
> don't do scoring?
> TX
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message