apache / apache/lucene

Optimize scanning in DocsEnum [LUCENE-2765]

Open
#3,839 7 comments 0 reactions 1 assignee Claimed by @rmuir View on GitHub
legacy-jira-fix-version:4.9 legacy-jira-fix-version:6.0 legacy-jira-priority:Major type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

Similar to #3835:

when we call advance(), after skipping it scans, but this can be optimized better than calling nextDoc() like today

```
// scan for the rest:
do {
nextDoc();
} while (target > doc);
```

in particular, the freq can be "skipVinted" and the skipDocs (deletedDocs) don't need to be checked during this scanning.

---
Migrated from [LUCENE-2765](https://issues.apache.org/jira/browse/LUCENE-2765) by Robert Muir (@rmuir), updated May 09 2016
Attachments: [LUCENE-2765.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-2765/LUCENE-2765.patch) (versions: 2)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.