diff --git a/source/de/anomic/kelondro/text/IndexCell.java b/source/de/anomic/kelondro/text/IndexCell.java index fe3e8cd1f..4bbdcd35c 100644 --- a/source/de/anomic/kelondro/text/IndexCell.java +++ b/source/de/anomic/kelondro/text/IndexCell.java @@ -180,13 +180,15 @@ public final class IndexCell extends AbstractBu * @throws IOException */ public int remove(byte[] termHash, Set urlHashes) throws IOException { + int removed = this.ram.remove(termHash, urlHashes); int reduced = this.array.replace(termHash, new RemoveRewriter(urlHashes)); - return reduced / this.array.rowdef().objectsize; + return removed + (reduced / this.array.rowdef().objectsize); } public boolean remove(byte[] termHash, String urlHash) throws IOException { + boolean removed = this.ram.remove(termHash, urlHash); int reduced = this.array.replace(termHash, new RemoveRewriter(urlHash)); - return reduced > 0; + return removed || (reduced > 0); } private static class RemoveRewriter implements ReferenceContainerArray.ContainerRewriter {