From 97e84439fb749a624c00ec01a6caa076c9c1c32f Mon Sep 17 00:00:00 2001
From: reger
Date: Mon, 20 Jan 2014 00:58:17 +0100
Subject: [PATCH] adjusted ConfigHeuristic and changed
QueryGoal.getOriginalQueryString to .getQueryString - since specific
heuristic Twitter & Blekko is not longer available or redundant with
OpenSearchHeuristic, adjusted ConfigHeuristic to use OpensearchHeuristic
settings only. For this the default OSD search target list is made available
(copied) by default and the other configs are removed.
- the return of QueryGoal.getOriginalQueryString includes the queryModifier, which are held separately in a modifier object,
but in most (all) cases just the query term is expected, clarified and renamed it to QueryGoal.getQueryString which returns
just the search term (if needed a .getOrigianlQueryString could be implemented in Queryparameters, adding the modifiers)
- started to adjust internal html href references from absolute to relative (currently it is mixed).
For future development we should prefer relative href targets (less trouble with context aware servlets)
---
defaults/yacy.init | 2 -
htroot/AccessTracker_p.java | 2 +-
htroot/ConfigHeuristics_p.html | 39 ++++---------------
htroot/ConfigHeuristics_p.java | 10 +----
htroot/ConfigNetwork_p.java | 3 +-
htroot/api/timeline.java | 2 +-
htroot/index.html | 22 ++++++-----
htroot/index.java | 6 ++-
htroot/yacysearch.java | 19 +++------
htroot/yacysearchitem.java | 2 +-
htroot/yacysearchtrailer.java | 18 ++++-----
.../yacy/http/servlets/GSAsearchServlet.java | 2 +-
.../net/yacy/http/servlets/SolrServlet.java | 2 +-
source/net/yacy/peers/Protocol.java | 2 +-
source/net/yacy/search/Switchboard.java | 15 +++++--
.../net/yacy/search/SwitchboardConstants.java | 2 -
.../net/yacy/search/query/AccessTracker.java | 4 +-
source/net/yacy/search/query/QueryGoal.java | 22 ++++++++---
source/net/yacy/search/query/QueryParams.java | 4 +-
source/net/yacy/search/query/SearchEvent.java | 2 +-
20 files changed, 81 insertions(+), 99 deletions(-)
diff --git a/defaults/yacy.init b/defaults/yacy.init
index 618119cf9..393fcaf48 100644
--- a/defaults/yacy.init
+++ b/defaults/yacy.init
@@ -1060,8 +1060,6 @@ donation.iframetarget=env/donate.html
# search heuristics
heuristic.site = false
-heuristic.blekko = false
-heuristic.twitter = false
heuristic.searchresults = false
heuristic.searchresults.crawlglobal = false
heuristic.opensearch = false
diff --git a/htroot/AccessTracker_p.java b/htroot/AccessTracker_p.java
index aaa42141a..a59840153 100644
--- a/htroot/AccessTracker_p.java
+++ b/htroot/AccessTracker_p.java
@@ -170,7 +170,7 @@ public class AccessTracker_p {
if (page == 2) {
// local search
prop.putNum("page_list_" + m + "_offset", query.offset);
- prop.putHTML("page_list_" + m + "_querystring", query.getQueryGoal().getOriginalQueryString(false));
+ prop.putHTML("page_list_" + m + "_querystring", query.getQueryGoal().getQueryString(false));
} else {
// remote search
prop.putHTML("page_list_" + m + "_peername", (query.remotepeer == null) ? "" : query.remotepeer.getName());
diff --git a/htroot/ConfigHeuristics_p.html b/htroot/ConfigHeuristics_p.html
index 83b70b7e1..5d127c80b 100644
--- a/htroot/ConfigHeuristics_p.html
+++ b/htroot/ConfigHeuristics_p.html
@@ -14,16 +14,16 @@