From 09bcc1034457f3f6507209078994ade2a2b90e73 Mon Sep 17 00:00:00 2001 From: orbiter Date: Sun, 19 Nov 2006 23:10:58 +0000 Subject: [PATCH] bugfix for some problems of last change with assortments git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2986 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- build.properties | 2 +- source/de/anomic/index/indexContainer.java | 3 +-- source/de/anomic/kelondro/kelondroCache.java | 8 ++++---- source/de/anomic/kelondro/kelondroCollectionIndex.java | 6 +++--- source/de/anomic/kelondro/kelondroRowCollection.java | 9 +-------- source/de/anomic/kelondro/kelondroRowSet.java | 6 ------ source/de/anomic/plasma/plasmaRankingCRProcess.java | 2 +- 7 files changed, 11 insertions(+), 25 deletions(-) diff --git a/build.properties b/build.properties index 4f1c335e2..c3ff07c26 100644 --- a/build.properties +++ b/build.properties @@ -3,7 +3,7 @@ javacSource=1.4 javacTarget=1.4 # Release Configuration -releaseVersion=0.485 +releaseVersion=0.486 releaseFile=yacy_dev_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz #releaseFile=yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz releaseDir=yacy_dev_v${releaseVersion}_${DSTAMP}_${releaseNr} diff --git a/source/de/anomic/index/indexContainer.java b/source/de/anomic/index/indexContainer.java index 5f866048e..393de7083 100644 --- a/source/de/anomic/index/indexContainer.java +++ b/source/de/anomic/index/indexContainer.java @@ -60,10 +60,9 @@ public class indexContainer extends kelondroRowSet { } public indexContainer(String wordHash, kelondroRow rowdef, kelondroOrder ordering, int column, boolean newRWI) { - super(rowdef); + super(rowdef, ordering, column, 0); this.wordHash = wordHash; this.lastTimeWrote = 0; - this.setOrdering(ordering, column); this.newRWI = newRWI; } diff --git a/source/de/anomic/kelondro/kelondroCache.java b/source/de/anomic/kelondro/kelondroCache.java index 7ccff890f..bfe93859c 100644 --- a/source/de/anomic/kelondro/kelondroCache.java +++ b/source/de/anomic/kelondro/kelondroCache.java @@ -58,10 +58,10 @@ public class kelondroCache implements kelondroIndex { assert write == false; this.index = backupIndex; this.keyrow = new kelondroRow(new kelondroColumn[]{index.row().column(index.primarykey())}); - this.readHitCache = (read) ? new kelondroRowSet(index.row()) : null; - this.readMissCache = (read) ? new kelondroRowSet(this.keyrow) : null; - this.writeBufferUnique = (write) ? new kelondroRowSet(index.row()) : null; - this.writeBufferDoubles = (write) ? new kelondroRowSet(index.row()) : null; + this.readHitCache = (read) ? new kelondroRowSet(index.row(), backupIndex.order(), backupIndex.primarykey(), 0) : null; + this.readMissCache = (read) ? new kelondroRowSet(this.keyrow, backupIndex.order(), backupIndex.primarykey(), 0) : null; + this.writeBufferUnique = (write) ? new kelondroRowSet(index.row(), backupIndex.order(), backupIndex.primarykey(), 0) : null; + this.writeBufferDoubles = (write) ? new kelondroRowSet(index.row(), backupIndex.order(), backupIndex.primarykey(), 0) : null; this.maxmiss = (read) ? (int) (buffersize / 10 / index.row().column(index.primarykey()).cellwidth()) : 0; this.maxrecords = (int) ((buffersize - maxmiss * index.row().column(index.primarykey()).cellwidth()) / index.row().objectsize()); this.readHit = 0; diff --git a/source/de/anomic/kelondro/kelondroCollectionIndex.java b/source/de/anomic/kelondro/kelondroCollectionIndex.java index 946c6cbc2..de4584c18 100644 --- a/source/de/anomic/kelondro/kelondroCollectionIndex.java +++ b/source/de/anomic/kelondro/kelondroCollectionIndex.java @@ -537,12 +537,12 @@ public class kelondroCollectionIndex { 4 /*loadfactor*/, rowdef); // fill index with values - kelondroRowSet collection = new kelondroRowSet(rowdef); + kelondroRowSet collection = new kelondroRowSet(rowdef, kelondroNaturalOrder.naturalOrder, 0, 0); collection.addUnique(rowdef.newEntry(new byte[][]{"abc".getBytes(), "efg".getBytes()})); collectionIndex.put("erstes".getBytes(), collection); for (int i = 0; i <= 17; i++) { - collection = new kelondroRowSet(rowdef); + collection = new kelondroRowSet(rowdef, kelondroNaturalOrder.naturalOrder, 0, 0); for (int j = 0; j < i; j++) { collection.addUnique(rowdef.newEntry(new byte[][]{("abc" + j).getBytes(), "xxx".getBytes()})); } @@ -552,7 +552,7 @@ public class kelondroCollectionIndex { // extend collections with more values for (int i = 0; i <= 17; i++) { - collection = new kelondroRowSet(rowdef); + collection = new kelondroRowSet(rowdef, kelondroNaturalOrder.naturalOrder, 0, 0); for (int j = 0; j < i; j++) { collection.addUnique(rowdef.newEntry(new byte[][]{("def" + j).getBytes(), "xxx".getBytes()})); } diff --git a/source/de/anomic/kelondro/kelondroRowCollection.java b/source/de/anomic/kelondro/kelondroRowCollection.java index f5e45e291..189e47e68 100644 --- a/source/de/anomic/kelondro/kelondroRowCollection.java +++ b/source/de/anomic/kelondro/kelondroRowCollection.java @@ -486,10 +486,10 @@ public class kelondroRowCollection { assert (chunkcount * this.rowdef.objectsize() <= chunkcache.length) : "chunkcount = " + chunkcount + ", objsize = " + this.rowdef.objectsize() + ", chunkcache.length = " + chunkcache.length; assert (i >= 0) && (i < chunkcount) : "i = " + i + ", chunkcount = " + chunkcount; assert (j >= 0) && (j < chunkcount) : "j = " + j + ", chunkcount = " + chunkcount; + assert (this.sortOrder != null); if (i == j) return 0; assert (this.sortColumn == 0) : "this.sortColumn = " + this.sortColumn; int keylength = this.rowdef.width(this.sortColumn); - assert (keylength <= 12) : "keylength = " + keylength; int colstart = this.rowdef.colstart[this.sortColumn]; int c = this.sortOrder.compare( chunkcache, @@ -498,13 +498,6 @@ public class kelondroRowCollection { chunkcache, j * this.rowdef.objectsize() + colstart, keylength); - /* - System.out.println("COMPARE(" + - new String(this.chunkcache, i * this.rowdef.objectsize(), this.rowdef.width(0)) + - ", " + - new String(this.chunkcache, j * this.rowdef.objectsize(), this.rowdef.width(0)) + - ")=" + c); - */ return c; } diff --git a/source/de/anomic/kelondro/kelondroRowSet.java b/source/de/anomic/kelondro/kelondroRowSet.java index 9f746848f..2587536e3 100644 --- a/source/de/anomic/kelondro/kelondroRowSet.java +++ b/source/de/anomic/kelondro/kelondroRowSet.java @@ -49,12 +49,6 @@ public class kelondroRowSet extends kelondroRowCollection implements kelondroInd this.removeMarker = rs.removeMarker; } - public kelondroRowSet(kelondroRow rowdef) { - super(rowdef, 0); - this.removeMarker = new TreeSet(); - this.profile = new kelondroProfile(); - } - public kelondroRowSet(kelondroRow rowdef, int objectCount) { super(rowdef, objectCount); this.removeMarker = new TreeSet(); diff --git a/source/de/anomic/plasma/plasmaRankingCRProcess.java b/source/de/anomic/plasma/plasmaRankingCRProcess.java index 39e6c3d15..bea67edb9 100644 --- a/source/de/anomic/plasma/plasmaRankingCRProcess.java +++ b/source/de/anomic/plasma/plasmaRankingCRProcess.java @@ -421,7 +421,7 @@ public class plasmaRankingCRProcess { // update domain-specific entry rci_entry = rci.get(anchorDom.getBytes(), false); - if (rci_entry == null) rci_entry = new kelondroRowSet(RCI_coli); + if (rci_entry == null) rci_entry = new kelondroRowSet(RCI_coli, kelondroBase64Order.enhancedCoder, 0, 0); rci_entry.add(refereeDom.getBytes()); // insert entry