| 451 | } |
| 452 | |
| 453 | void PostingListCursor::next() |
| 454 | { |
| 455 | if (!is_valid) |
| 456 | return; |
| 457 | |
| 458 | ++index; |
| 459 | |
| 460 | if (is_embedded) |
| 461 | { |
| 462 | if (index >= decoded_count) |
| 463 | is_valid = false; |
| 464 | return; |
| 465 | } |
| 466 | |
| 467 | if (index >= decoded_count) |
| 468 | { |
| 469 | ++current_block; |
| 470 | if (current_block < current_segment->block_count) |
| 471 | { |
| 472 | decodeBlock(current_block); |
| 473 | return; |
| 474 | } |
| 475 | |
| 476 | /// Current segment exhausted — advance to next one. |
| 477 | size_t next_segment = current_segment_idx + 1; |
| 478 | if (next_segment >= total_segments) |
| 479 | { |
| 480 | is_valid = false; |
| 481 | return; |
| 482 | } |
| 483 | |
| 484 | prepareSegment(next_segment); |
| 485 | decodeBlock(0); |
| 486 | } |
| 487 | } |
| 488 | |
| 489 | /// Scatter-write into `out` for doc_ids in values[begin..length). |
| 490 | /// PadOp::Or assigns 1, PadOp::And increments the counter. |
no outgoing calls