cpoerschke commented on PR #2248: URL: https://github.com/apache/solr/pull/2248#issuecomment-2049819054
> Yes I mean _the_ FixedBitSet (otherwise I just would have said a bit set). No I don't know of similar code doing this, and I don't expect it's in Lucene/Solr already. Lucene is very segment oriented so there's no need for an entire index bit set view. Solr has forever clung to index level bit sets, for better/worse (I think worse). I'm tempted to help but not sure I have the time. It's not a blocker any way; the code can be improved. Okay, I've got the basic outline of the idea I think: ``` final FixedBitSet bitsetA = new FixedBitSet(numBits); bitsetA.set(...); final int skipWords = 8; final int skipBits = skipWords * 64; final FixedBitSet bitsetB = new FixedBitSet(numBits - skipBits); bitsetB.set(... - skipBits); final long[] storedBits = new long[FixedBitSet.bits2words(numBits)]; System.arraycopy(bitsetA.getBits(), 0, storedBits, 0, bitsetA.getBits().length); System.arraycopy(bitsetB.getBits(), 0, storedBits, skipWords, bitsetB.getBits().length); final FixedBitSet bitsetC = new FixedBitSet(storedBits, numBits); ``` And then as a next step I'll have a go at applying that to the collecting code here on this PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org