lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikhail Khludnev <m...@apache.org>
Subject Re: Apply Lucene Query on Bits
Date Mon, 05 Dec 2016 12:30:41 GMT
Hello Hendrik,

I lurked sources and find nothing better than copy a few pieces
from org.apache.lucene.search.MultiTermQueryConstantScoreWrapper<Q> and
especially
org.apache.lucene.search.MultiTermQueryConstantScoreWrapper.createWeight(...).new
ConstantScoreWeight() {...}.scorer(DocIdSet).

On Sun, Dec 4, 2016 at 12:04 PM, Hendrik Dev <hendrikdev22@gmail.com> wrote:

> Hi,
>
> how to apply a org.apache.lucene.search.Query on a given
> org.apache.lucene.util.Bits object?
>
> Background: I have a subclass of
> org.apache.lucene.index.FilterLeafReader where i want to filter the
> livedocs by applying a query on the "Bits".
>
> According to javadoc i need also to override numDocs() if i override
> getLiveDocs(). So the question extends also to how to filter the
> number of documents based on a query (within a FilterLeafReader)
>
> Thx
> Hendrik
>
>
> --
> Hendrik Saly (salyh, hendrikdev22)
> @hendrikdev22
> PGP: 0x22D7F6EC
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


-- 
Sincerely yours
Mikhail Khludnev

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message