I reviewed how we can perhaps not break the API. I thought first to
deprecate BitDocSet and create a new class BitsDocSet which will use
FixedBitSet. But the problem is that DocSet (the interface) commits to
OpenBitSet in its APIs: .getBits() and .setBitsOn().
I think that .setBitsOn could take a DocSet and check if it's a BitsDocSet,
call bits.or(), otherwise, iterate on the bits and call add().
As for .getBits(), it's currently used by DocSetBase's various base impls,
so I think if we made it protected (and only on DocSetBase), we could get
rid of it from the public API. BitDocSet would then override to return a
bits.clone(), whereas the others would just create a new FBS, like what
DocSetBase.getBits() does now.
It's also used by UninvertField, but it assumes the given DocSet is
BitDocSet already, so we can just add .getBits() to BitDocSet...
While this breaks the DocSet API, I think it's a good break as it allows
flexibility in the future (e.g if we rename FixedBitSet to IntBitSet, the
API doesn't break again). I'll post a patch soon.