Merge branch 'master' of ssh://git@gitorious.org/yacy/rc1.git

pull/1/head
Michael Peter Christen 13 years ago
commit 205f8b222b

@ -18,7 +18,8 @@
<input name="text" id="text" type="text" size="80" maxlength="256" value="#[text]#" style="font-size:16px"/>
</dd>
<dt>
<label>Regular Expression</label>
<label>Regular Expression</label><br />
This is a <a href="http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html">Java Pattern</a>
</dt>
<dd>
<textarea name="regex" id="regex" cols="80" rows="5" style="font-size:16px">#[regex]#</textarea>

@ -26,6 +26,7 @@
package net.yacy.search.query;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.ConcurrentModificationException;
import java.util.Iterator;
@ -40,6 +41,7 @@ import com.hp.hpl.jena.rdf.model.RDFNode;
import com.hp.hpl.jena.rdf.model.Resource;
import net.yacy.contentcontrol.ContentControlFilterUpdateThread;
import net.yacy.cora.date.GenericFormatter;
import net.yacy.cora.document.ASCII;
import net.yacy.cora.document.analysis.Classification;
import net.yacy.cora.document.analysis.Classification.ContentDomain;
@ -84,6 +86,14 @@ import net.yacy.search.snippet.ResultEntry;
public final class SearchEvent {
private static long noRobinsonLocalRWISearch = 0;
static {
try {
noRobinsonLocalRWISearch = GenericFormatter.FORMAT_SHORT_DAY.parse("20121107").getTime();
} catch (ParseException e) {
}
}
public static Log log = new Log("SEARCH");
private static final long maxWaitPerResult = 30;
@ -179,7 +189,10 @@ public final class SearchEvent {
this.localsearch = RemoteSearch.solrRemoteSearch(this, 100, null /*this peer*/, Switchboard.urlBlacklist);
// start a local RWI search concurrently
this.rankingProcess.start();
if (this.remote || this.peers.mySeed().getBirthdate() < noRobinsonLocalRWISearch) {
// we start the local search only if this peer is doing a remote search or when it is doing a local search and the peer is old
this.rankingProcess.start();
}
if (this.remote) {
// start global searches

Loading…
Cancel
Save