fix use of NETWORK_SEARCHVERIFY for rwi verification

was not used to set the searchevent parameter (done in SearchEventCache.getEvent)
- remove unused corresponding QueryParams.filterfailurls param.
pull/37/head
reger 9 years ago
parent 020630efd8
commit 28b8bc290a

@ -659,7 +659,6 @@ public class IndexControlRWIs_p {
sb.index, sb.index,
sb.getRanking(), sb.getRanking(),
"",//userAgent "",//userAgent
false,
0.0d, 0.0d, 0.0d, 0.0d, 0.0d, 0.0d,
new String[0]); new String[0]);
final SearchEvent theSearch = SearchEventCache.getEvent(query, sb.peers, sb.tables, null, false, sb.loader, Integer.MAX_VALUE, Long.MAX_VALUE); final SearchEvent theSearch = SearchEventCache.getEvent(query, sb.peers, sb.tables, null, false, sb.loader, Integer.MAX_VALUE, Long.MAX_VALUE);
@ -670,8 +669,7 @@ public class IndexControlRWIs_p {
} else { } else {
prop.put("searchresult", 3); prop.put("searchresult", 3);
prop.put("searchresult_allurl", theSearch.local_rwi_available.get()); prop.put("searchresult_allurl", theSearch.local_rwi_available.get());
prop prop.put("searchresult_description", theSearch.flagCount()[WordReferenceRow.flag_app_dc_description]);
.put("searchresult_description", theSearch.flagCount()[WordReferenceRow.flag_app_dc_description]);
prop.put("searchresult_title", theSearch.flagCount()[WordReferenceRow.flag_app_dc_title]); prop.put("searchresult_title", theSearch.flagCount()[WordReferenceRow.flag_app_dc_title]);
prop.put("searchresult_creator", theSearch.flagCount()[WordReferenceRow.flag_app_dc_creator]); prop.put("searchresult_creator", theSearch.flagCount()[WordReferenceRow.flag_app_dc_creator]);
prop.put("searchresult_subject", theSearch.flagCount()[WordReferenceRow.flag_app_dc_subject]); prop.put("searchresult_subject", theSearch.flagCount()[WordReferenceRow.flag_app_dc_subject]);

@ -251,7 +251,6 @@ public final class search {
indexSegment, indexSegment,
rankingProfile, rankingProfile,
header.get(HeaderFramework.USER_AGENT, ""), header.get(HeaderFramework.USER_AGENT, ""),
false,
0.0d, 0.0d,
0.0d, 0.0d,
0.0d, 0.0d,
@ -316,7 +315,6 @@ public final class search {
sb.index, sb.index,
rankingProfile, rankingProfile,
header.get(HeaderFramework.USER_AGENT, ""), header.get(HeaderFramework.USER_AGENT, ""),
false,
0.0d, 0.0d,
0.0d, 0.0d,
0.0d, 0.0d,

@ -669,9 +669,6 @@ public class yacysearch {
indexSegment, indexSegment,
ranking, ranking,
header.get(HeaderFramework.USER_AGENT, ""), header.get(HeaderFramework.USER_AGENT, ""),
sb.getConfigBool(SwitchboardConstants.SEARCH_VERIFY_DELETE, false)
&& sb.getConfigBool(SwitchboardConstants.NETWORK_SEARCHVERIFY, false)
&& sb.peers.mySeed().getFlagAcceptRemoteIndex(),
lat, lon, rad, lat, lon, rad,
sb.getConfigArray("search.navigation", "")); sb.getConfigArray("search.navigation", ""));
EventTracker.delete(EventTracker.EClass.SEARCH); EventTracker.delete(EventTracker.EClass.SEARCH);

@ -205,8 +205,7 @@ public class FederateSearchManager {
sb.index, sb.index,
sb.getRanking(), sb.getRanking(),
"",//userAgent "",//userAgent
false, 0.0d, 0.0d, 0.0d,
0.0d, 0.0d, -1.0d,
new String[0]); new String[0]);
return query(query); return query(query);

@ -141,7 +141,6 @@ public final class QueryParams {
public int transmitcount; // number of results that had been shown to the user public int transmitcount; // number of results that had been shown to the user
public long searchtime, urlretrievaltime, snippetcomputationtime; // time to perform the search, to get all the urls, and to compute the snippets public long searchtime, urlretrievaltime, snippetcomputationtime; // time to perform the search, to get all the urls, and to compute the snippets
public final String userAgent; public final String userAgent;
protected boolean filterfailurls;
protected double lat, lon, radius; protected double lat, lon, radius;
public LinkedHashSet<String> facetfields; public LinkedHashSet<String> facetfields;
private SolrQuery cachedQuery; private SolrQuery cachedQuery;
@ -173,7 +172,6 @@ public final class QueryParams {
final Segment indexSegment, final Segment indexSegment,
final RankingProfile ranking, final RankingProfile ranking,
final String userAgent, final String userAgent,
final boolean filterfailurls,
final double lat, final double lat,
final double lon, final double lon,
final double radius, final double radius,
@ -240,7 +238,6 @@ public final class QueryParams {
this.indexSegment = indexSegment; this.indexSegment = indexSegment;
this.userAgent = userAgent; this.userAgent = userAgent;
this.transmitcount = 0; this.transmitcount = 0;
this.filterfailurls = filterfailurls;
// we normalize here the location and radius because that should cause a better caching // we normalize here the location and radius because that should cause a better caching
// and as surplus it will increase privacy // and as surplus it will increase privacy
this.lat = Math.floor(lat * this.kmNormal) / this.kmNormal; this.lat = Math.floor(lat * this.kmNormal) / this.kmNormal;

@ -170,7 +170,8 @@ public class SearchEventCache {
// start a new event // start a new event
Switchboard sb = Switchboard.getSwitchboard(); Switchboard sb = Switchboard.getSwitchboard();
final boolean delete = sb == null || Switchboard.getSwitchboard().getConfigBool(SwitchboardConstants.SEARCH_VERIFY_DELETE, true); final boolean delete = sb == null || Switchboard.getSwitchboard().getConfigBool(SwitchboardConstants.SEARCH_VERIFY_DELETE, true)
|| (sb.getConfigBool(SwitchboardConstants.NETWORK_SEARCHVERIFY, false) && sb.peers.mySeed().getFlagAcceptRemoteIndex());
final boolean addToLocalIdx = sb == null || Switchboard.getSwitchboard().getConfigBool(SwitchboardConstants.REMOTESEARCH_RESULT_STORE, true); final boolean addToLocalIdx = sb == null || Switchboard.getSwitchboard().getConfigBool(SwitchboardConstants.REMOTESEARCH_RESULT_STORE, true);
event = new SearchEvent(query, peers, workTables, preselectedPeerHashes, generateAbstracts, loader, remote_maxcount, remote_maxtime, delete, addToLocalIdx); event = new SearchEvent(query, peers, workTables, preselectedPeerHashes, generateAbstracts, loader, remote_maxcount, remote_maxtime, delete, addToLocalIdx);
MemoryControl.request(100 * 1024 * 1024, false); // this may trigger a short memory status which causes a reducing of cache space of other threads MemoryControl.request(100 * 1024 * 1024, false); // this may trigger a short memory status which causes a reducing of cache space of other threads

Loading…
Cancel
Save