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
This commit is contained in:
orbiter 2006-11-19 23:10:58 +00:00
parent e3d75f42bd
commit 09bcc10344
7 changed files with 11 additions and 25 deletions

View File

@ -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}

View File

@ -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;
}

View File

@ -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;

View File

@ -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()}));
}

View File

@ -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;
}

View File

@ -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();

View File

@ -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