Skip to content

Commit

Permalink
Fix bug in exclude-only case with no doc values in segment
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Froh <[email protected]>
  • Loading branch information
msfroh committed Aug 5, 2024
1 parent d93db7e commit f6e1c96
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -480,11 +480,11 @@ private static void process(
@Override
public LongBitSet acceptedGlobalOrdinals(SortedSetDocValues globalOrdinals) throws IOException {
LongBitSet accept = new LongBitSet(globalOrdinals.getValueCount());
if (includePrefixes.isEmpty()) {
if (!includePrefixes.isEmpty()) {
process(globalOrdinals, accept.length(), includePrefixes, accept::set);
} else if (accept.length() > 0) {
// Exclude-only
accept.set(0, accept.length());
} else {
process(globalOrdinals, accept.length(), includePrefixes, accept::set);
}
process(globalOrdinals, accept.length(), excludePrefixes, accept::clear);
return accept;
Expand Down

0 comments on commit f6e1c96

Please sign in to comment.