final void add(Scorer scorer, boolean required, boolean prohibited) throws IOException { int mask = 0; if (required || prohibited) { if (nextMask == 0) throw new IndexOutOfBoundsException ("More than 32 required/prohibited clauses in query."); mask = nextMask; nextMask = nextMask << 1; } else mask = 0; if (!prohibited) maxCoord++; if (prohibited) prohibitedMask |= mask; // update prohibited mask else if (required) requiredMask |= mask; // update required mask scorers = new SubScorer(scorer, required, prohibited, bucketTable.newCollector(mask), scorers); }
final void add(Scorer scorer, boolean required, boolean prohibited) throws IOException { int mask = 0; if (required || prohibited) { if (nextMask == 0) throw new IndexOutOfBoundsException ("More than 32 required/prohibited clauses in query."); mask = nextMask; nextMask = nextMask << 1; } else mask = 0; if (!prohibited) maxCoord++; if (prohibited) prohibitedMask |= mask; // update prohibited mask else if (required) requiredMask |= mask; // update required mask scorers = new SubScorer(scorer, required, prohibited, bucketTable.newCollector(mask), scorers); }
final void add(Scorer scorer, boolean required, boolean prohibited) throws IOException { int mask = 0; if (required || prohibited) { if (nextMask == 0) throw new IndexOutOfBoundsException ("More than 32 required/prohibited clauses in query."); mask = nextMask; nextMask = nextMask << 1; } else mask = 0; if (!prohibited) maxCoord++; if (prohibited) prohibitedMask |= mask; // update prohibited mask else if (required) requiredMask |= mask; // update required mask scorers = new SubScorer(scorer, required, prohibited, bucketTable.newCollector(mask), scorers); }