|
|
@ -206,19 +206,14 @@ public final class plasmaWordIndexAssortmentCluster {
|
|
|
|
// collect all records from all the assortments and return them
|
|
|
|
// collect all records from all the assortments and return them
|
|
|
|
plasmaWordIndexEntryContainer buffer, record = new plasmaWordIndexEntryContainer(wordHash);
|
|
|
|
plasmaWordIndexEntryContainer buffer, record = new plasmaWordIndexEntryContainer(wordHash);
|
|
|
|
long limitTime = (maxTime < 0) ? Long.MAX_VALUE : System.currentTimeMillis() + maxTime;
|
|
|
|
long limitTime = (maxTime < 0) ? Long.MAX_VALUE : System.currentTimeMillis() + maxTime;
|
|
|
|
for (int i = 0; i < clusterCount; i++) {
|
|
|
|
for (int i = 0; i < clusterCount; i++) {
|
|
|
|
buffer = assortments[i].remove(wordHash);
|
|
|
|
buffer = assortments[i].remove(wordHash);
|
|
|
|
if (buffer != null) record.add(buffer);
|
|
|
|
if (buffer != null) record.add(buffer);
|
|
|
|
if (System.currentTimeMillis() > limitTime) break;
|
|
|
|
if (System.currentTimeMillis() > limitTime) break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return record;
|
|
|
|
return record;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Iterator hashConjunction(String startWordHash, boolean up) {
|
|
|
|
|
|
|
|
// Old convention implies rot = true
|
|
|
|
|
|
|
|
return hashConjunction(startWordHash, up, true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Iterator hashConjunction(String startWordHash, boolean up, boolean rot) {
|
|
|
|
public Iterator hashConjunction(String startWordHash, boolean up, boolean rot) {
|
|
|
|
HashSet iterators = new HashSet();
|
|
|
|
HashSet iterators = new HashSet();
|
|
|
|
//if (rot) System.out.println("WARNING: kelondroMergeIterator does not work correctly when individual iterators rotate on their own!");
|
|
|
|
//if (rot) System.out.println("WARNING: kelondroMergeIterator does not work correctly when individual iterators rotate on their own!");
|
|
|
|