diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java index 11c7a8e0d..7c1034043 100644 --- a/htroot/yacysearch.java +++ b/htroot/yacysearch.java @@ -140,7 +140,7 @@ public class yacysearch { boolean global = (post == null) ? true : post.get("resource", "global").equals("global"); final boolean indexDistributeGranted = sb.getConfig("allowDistributeIndex", "true").equals("true"); final boolean indexReceiveGranted = sb.getConfig("allowReceiveIndex", "true").equals("true"); - //if (!indexDistributeGranted || !indexReceiveGranted) { global = false; } + if (!indexDistributeGranted || !indexReceiveGranted) { global = false; } final long searchtime = 1000 * Long.parseLong(post.get("time", "10")); String urlmask = ""; if (post.containsKey("urlmask") && post.get("urlmask").equals("no")) { diff --git a/source/de/anomic/plasma/plasmaDHTChunk.java b/source/de/anomic/plasma/plasmaDHTChunk.java index 5fce764b7..919e58fd6 100644 --- a/source/de/anomic/plasma/plasmaDHTChunk.java +++ b/source/de/anomic/plasma/plasmaDHTChunk.java @@ -229,6 +229,10 @@ public class plasmaDHTChunk { // iterate over indexes to fetch url entries and store them in the urlCache while ((urlIter.hasNext()) && (maxcount > refcount) && (System.currentTimeMillis() < timeout)) { iEntry = (indexRWIEntry) urlIter.next(); + if ((iEntry == null) || (iEntry.urlHash() == null)) { + urlIter.remove(); + continue; + } lurl = lurls.load(iEntry.urlHash(), iEntry); if ((lurl == null) || (lurl.comp().url() == null)) { //yacyCore.log.logFine("DEBUG selectTransferContainersResource: not-bound url hash '" + iEntry.urlHash() + "' for word hash " + container.getWordHash()); diff --git a/source/de/anomic/plasma/plasmaWordIndex.java b/source/de/anomic/plasma/plasmaWordIndex.java index 75ada6aa5..cb72d181d 100644 --- a/source/de/anomic/plasma/plasmaWordIndex.java +++ b/source/de/anomic/plasma/plasmaWordIndex.java @@ -49,7 +49,6 @@ import de.anomic.index.indexURLEntry; import de.anomic.kelondro.kelondroBase64Order; import de.anomic.kelondro.kelondroException; import de.anomic.kelondro.kelondroMergeIterator; -import de.anomic.kelondro.kelondroNaturalOrder; import de.anomic.kelondro.kelondroOrder; import de.anomic.kelondro.kelondroRow; import de.anomic.net.URL; @@ -65,7 +64,7 @@ public final class plasmaWordIndex implements indexRI { private static final kelondroRow payloadrownew = indexRWIEntryNew.urlEntryRow; private final File oldDatabaseRoot; - private final kelondroOrder indexOrder = new kelondroNaturalOrder(true); + private final kelondroOrder indexOrder = kelondroBase64Order.enhancedCoder; private final indexRAMRI dhtOutCache, dhtInCache; private final indexCollectionRI collections; // new database structure to replace AssortmentCluster and FileCluster private int assortmentBufferSize; // kb @@ -618,6 +617,8 @@ public final class plasmaWordIndex implements indexRI { } private Iterator wordContainers(String startWordHash, int resourceLevel) throws IOException { + kelondroOrder containerOrder = new indexContainerOrder((kelondroOrder) indexOrder.clone()); + containerOrder.rotate(startWordHash.getBytes()); if (resourceLevel == plasmaWordIndex.RL_RAMCACHE) { return dhtOutCache.wordContainers(startWordHash, false); } @@ -625,7 +626,7 @@ public final class plasmaWordIndex implements indexRI { return new kelondroMergeIterator( dhtOutCache.wordContainers(startWordHash, false), collections.wordContainers(startWordHash, false), - new indexContainerOrder(kelondroNaturalOrder.naturalOrder), + containerOrder, indexContainer.containerMergeMethod, true); } else { @@ -633,7 +634,7 @@ public final class plasmaWordIndex implements indexRI { return new kelondroMergeIterator( dhtOutCache.wordContainers(startWordHash, false), (assortmentCluster == null) ? null : assortmentCluster.wordContainers(startWordHash, true, false), - new indexContainerOrder(kelondroNaturalOrder.naturalOrder), + containerOrder, indexContainer.containerMergeMethod, true); } @@ -642,11 +643,11 @@ public final class plasmaWordIndex implements indexRI { new kelondroMergeIterator( dhtOutCache.wordContainers(startWordHash, false), (assortmentCluster == null) ? null : assortmentCluster.wordContainers(startWordHash, true, false), - new indexContainerOrder(kelondroNaturalOrder.naturalOrder), + containerOrder, indexContainer.containerMergeMethod, true), backend.wordContainers(startWordHash, false), - new indexContainerOrder(kelondroNaturalOrder.naturalOrder), + containerOrder, indexContainer.containerMergeMethod, true); }