Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed Mar 30, 2009
1 parent d2e2420 commit 587838b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
11 changes: 8 additions & 3 deletions htroot/yacysearch.java
Expand Up @@ -103,13 +103,14 @@ public static serverObjects respond(final httpRequestHeader header, final server
prop.put("input_count", "10");
prop.put("input_offset", "0");
prop.put("input_resource", "global");
prop.put("input_urlmaskfilter", ".*");
prop.put("input_prefermaskfilter", "");
prop.put("input_urlmaskfilter", (post == null) ? ".*" : post.get("urlmaskfilter", ".*"));
prop.put("input_prefermaskfilter", (post == null) ? "" : post.get("prefermaskfilter", ""));
prop.put("input_tenant", (post == null) ? "" : post.get("tenant", ""));
prop.put("input_indexof", "off");
prop.put("input_constraint", "");
prop.put("input_cat", "href");
prop.put("input_depth", "0");
prop.put("input_verify", "true");
prop.put("input_verify", (post == null) ? "true" : post.get("verify", "true"));
prop.put("input_contentdom", "text");
prop.put("input_contentdomCheckText", "1");
prop.put("input_contentdomCheckAudio", "0");
Expand Down Expand Up @@ -285,6 +286,10 @@ public static serverObjects respond(final httpRequestHeader header, final server
}
}
}
if (post.containsKey("tenant")) {
final String tenant = post.get("tenant");
if (urlmask == null) urlmask = ".*" + tenant + ".*"; else urlmask = ".*" + tenant + urlmask;
}
if (urlmask == null || urlmask.length() == 0) urlmask = originalUrlMask; //if no urlmask was given

// read the language from the language-restrict option 'lr'
Expand Down
4 changes: 3 additions & 1 deletion source/de/anomic/crawler/Balancer.java
Expand Up @@ -564,7 +564,9 @@ public synchronized CrawlEntry pop(boolean delay, CrawlProfile profile) throws I
final int s = urlFileIndex.size();
Row.Entry rowEntry = urlFileIndex.remove(result.getBytes());
if (rowEntry == null) {
throw new IOException("get() found a valid urlhash, but failed to fetch the corresponding url entry - total size = " + size() + ", fileStack.size() = " + urlFileStack.size() + ", ramStack.size() = " + urlRAMStack.size() + ", domainStacks.size() = " + domainStacks.size());
String error = "get() found a valid urlhash, but failed to fetch the corresponding url entry - total size = " + size() + ", fileStack.size() = " + urlFileStack.size() + ", ramStack.size() = " + urlRAMStack.size() + ", domainStacks.size() = " + domainStacks.size();
//this.clear();
throw new IOException(error + " - cleared the balancer");
}
assert urlFileIndex.size() + 1 == s : "urlFileIndex.size() = " + urlFileIndex.size() + ", s = " + s + ", result = " + result;
final CrawlEntry crawlEntry = new CrawlEntry(rowEntry);
Expand Down
3 changes: 3 additions & 0 deletions source/de/anomic/kelondro/blob/HeapWriter.java
Expand Up @@ -103,14 +103,17 @@ public synchronized void add(final byte[] key, final byte[] blob) throws IOExcep
}

protected static File fingerprintIndexFile(File f) {
assert f != null;
return new File(f.getParentFile(), f.getName() + "." + fingerprintFileHash(f) + ".idx");
}

protected static File fingerprintGapFile(File f) {
assert f != null;
return new File(f.getParentFile(), f.getName() + "." + fingerprintFileHash(f) + ".gap");
}

protected static String fingerprintFileHash(File f) {
assert f != null;
return Digest.fastFingerprintB64(f, false).substring(0, 12);
}

Expand Down
1 change: 1 addition & 0 deletions source/de/anomic/yacy/dht/Dispatcher.java
Expand Up @@ -256,6 +256,7 @@ private ArrayList<ReferenceContainer>[] splitContainers(ArrayList<ReferenceConta
* then no additional IO is necessary.
*/
private void enqueueContainersToCloud(final ArrayList<ReferenceContainer>[] containers) {
if (transmissionCloud == null) return;
ReferenceContainer lastContainer;
String primaryTarget;
Transmission.Chunk entry;
Expand Down

0 comments on commit 587838b

Please sign in to comment.