Skip to content

Commit

Permalink
??
Browse files Browse the repository at this point in the history
  • Loading branch information
glorieux-f committed Aug 17, 2023
1 parent 735cffc commit 3af5845
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions java/alix/lucene/search/Scale.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,25 +110,24 @@ public Scale(final Alix alix, final BitSet filter, final String fieldInt, final
final Bits liveDocs = leaf.getLiveDocs();
final int docBase = context.docBase;
int docLeaf;
// all doc given on this iterao will have a value
while ((docLeaf = docs4num.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) {
// doc deleted, go next
if (liveDocs != null && !liveDocs.get(docLeaf)) {
continue;
}
int docId = docBase + docLeaf;
// doc not in corpus, go next
if (filter != null && !filter.get(docId))
if (filter != null && !filter.get(docId)) {
continue;
Tick tick;
// doc is deleted, should not be in a corpus, but sometimes...
if (liveDocs != null && !liveDocs.get(docLeaf)) {
// doc deleted, no tick
continue;
// tick = new Tick(docId, last, 0); // insert an empty slice for deleted docs
} else {
int v = (int) docs4num.longValue(); // force label to int;
if (min > v)
min = v;
if (max < v)
max = v;
tick = new Tick(docId, v, docLength[docId]);
}
Tick tick;
int v = (int) docs4num.longValue(); // force label to int;
if (min > v)
min = v;
if (max < v)
max = v;
tick = new Tick(docId, v, docLength[docId]);
// put same Tick for different
tickByOrder[docId] = tick;
tickByDocid[docId] = tick;
Expand Down

0 comments on commit 3af5845

Please sign in to comment.