Re: Apply Lucene Query on Bits

2016-12-06 Thread Hendrik Dev
: Adrien Grand [mailto:jpou...@gmail.com] >> Sent: Monday, December 5, 2016 3:35 PM >> To: java-user@lucene.apache.org >> Subject: Re: Apply Lucene Query on Bits >> >> Do I get it right that you have a query that defines a set of visible >> documents, and you want t

RE: Apply Lucene Query on Bits

2016-12-05 Thread Uwe Schindler
ject: Re: Apply Lucene Query on Bits > > Do I get it right that you have a query that defines a set of visible > documents, and you want to make sure that your FilterReader only sees > those > documents? > > If this is the case, then you could use FixedBitSet.or to load the &g

Re: Apply Lucene Query on Bits

2016-12-05 Thread Adrien Grand
Do I get it right that you have a query that defines a set of visible documents, and you want to make sure that your FilterReader only sees those documents? If this is the case, then you could use FixedBitSet.or to load the Scorer.iterator() into a FixedBitSet, and then maintain two caches: - one

Re: Apply Lucene Query on Bits

2016-12-05 Thread Mikhail Khludnev
Hello Hendrik, I lurked sources and find nothing better than copy a few pieces from org.apache.lucene.search.MultiTermQueryConstantScoreWrapper and especially org.apache.lucene.search.MultiTermQueryConstantScoreWrapper.createWeight(...).new ConstantScoreWeight() {...}.scorer(DocIdSet). On Sun, De