Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
Converted ajax URL to relative and added a check on the response status.
luccioman89017e17e4f9
diff --git a/htroot/Crawler_p.java b/htroot/Crawler_p.javaindex 5d9ba52c2..4d1bae75d 100644--- a/htroot/Crawler_p.java+++ b/htroot/Crawler_p.java@@ -93,7 +93,7 @@ public class Crawler_p {Segment segment = sb.index;Fulltext fulltext = segment.fulltext();- String localSolr = "/solr/select?core=collection1&q=*:*&start=0&rows=3";+ String localSolr = "solr/select?core=collection1&q=*:*&start=0&rows=3";String remoteSolr = env.getConfig(SwitchboardConstants.FEDERATED_SERVICE_SOLR_INDEXING_URL, localSolr);if (!remoteSolr.endsWith("/")) remoteSolr = remoteSolr + "/";prop.put("urlpublictextSolrURL", fulltext.connectedLocalSolr() ? localSolr : remoteSolr + "collection1/select?&q=*:*&start=0&rows=3");diff --git a/htroot/HostBrowser.java b/htroot/HostBrowser.javaindex d95565634..b90b2d8f0 100644--- a/htroot/HostBrowser.java+++ b/htroot/HostBrowser.java@@ -288,7 +288,7 @@ public class HostBrowser {int c = 0; for (Entry<Long, Integer> entry: statMap.entrySet()) {prop.put("hostanalysis_facets_" + fc + "_facet_" + c + "_key", entry.getKey());prop.put("hostanalysis_facets_" + fc + "_facet_" + c + "_count", entry.getValue());- prop.put("hostanalysis_facets_" + fc + "_facet_" + c + "_a", "http://localhost:" + sb.getConfigInt("port", 8090) + "/solr/collection1/select?q=host_s:" + host + " AND " + facetentry.getKey() + ":" + entry.getKey() + "&defType=edismax&start=0&rows=1000&fl=sku,crawldepth_i");+ prop.put("hostanalysis_facets_" + fc + "_facet_" + c + "_a", "solr/collection1/select?q=host_s:" + host + " AND " + facetentry.getKey() + ":" + entry.getKey() + "&defType=edismax&start=0&rows=1000&fl=sku,crawldepth_i");c++;}prop.put("hostanalysis_facets_" + fc + "_facet", c);diff --git a/htroot/IndexControlURLs_p.html b/htroot/IndexControlURLs_p.htmlindex 598341f61..d1d5964ea 100644--- a/htroot/IndexControlURLs_p.html+++ b/htroot/IndexControlURLs_p.html@@ -21,10 +21,10 @@ function search(query) {else if (window.ActiveXObject) { // IEself.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");}- self.xmlHttpReq.open('GET', "/solr/select?q=sku:\"" + query + "\" OR host_s:\"" + query + "\" OR host_dnc_s:\"" + query + "\" OR host_organization_s:\"" + query + "\" OR host_organizationdnc_s:\"" + query + "\" OR host_subdomain_s:\"" + query + "\" OR url_paths_sxt:\"" + query + "\" OR url_file_name_s:\"" + query + "\"&start=0&rows=100&wt=yjson", true);+ self.xmlHttpReq.open('GET', "solr/select?q=sku:\"" + query + "\" OR host_s:\"" + query + "\" OR host_dnc_s:\"" + query + "\" OR host_organization_s:\"" + query + "\" OR host_organizationdnc_s:\"" + query + "\" OR host_subdomain_s:\"" + query + "\" OR url_paths_sxt:\"" + query + "\" OR url_file_name_s:\"" + query + "\"&start=0&rows=100&wt=yjson", true);self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');self.xmlHttpReq.onreadystatechange = function() {- if (self.xmlHttpReq.readyState == 4) {+ if (self.xmlHttpReq.readyState == 4 && self.xmlHttpReq.status == 200) {updatepage(self.xmlHttpReq.responseText);}}