Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
added two virtual instances of solr for the both cores: collection1 and webgraph. These cores are now accessible at /solr/collection1/select instead /solr/select?core=collection1 and /solr/webgraph/select instead /solr/select?core=webgraph in addition to the old behavior to support compatibility to the old peers. These new paths are fully solr standard-conform and will allow the cross-linking between YaCy peers using their public solr API.
Michael Peter Christendc06e407ce66
diff --git a/source/net/yacy/http/Jetty8HttpServerImpl.java b/source/net/yacy/http/Jetty8HttpServerImpl.javaindex 7bea55583..bd6752d07 100644--- a/source/net/yacy/http/Jetty8HttpServerImpl.java+++ b/source/net/yacy/http/Jetty8HttpServerImpl.java@@ -134,7 +134,9 @@ public class Jetty8HttpServerImpl implements YaCyHttpServer {htrootContext.addServlet(sholder,"/*");//add SolrServlet- htrootContext.addServlet(SolrServlet.class,"/solr/select");+ htrootContext.addServlet(SolrServlet.class, "/solr/select"); // uses the default core, collection1+ htrootContext.addServlet(SolrServlet.class, "/solr/collection1/select"); // the same servlet, identifies the collection1 core using the path+ htrootContext.addServlet(SolrServlet.class, "/solr/webgraph/select"); // the same servlet, identifies the webgraph core using the path// add proxy?url= servlethtrootContext.addServlet(YaCyProxyServlet.class,"/proxy.html");diff --git a/source/net/yacy/http/servlets/SolrServlet.java b/source/net/yacy/http/servlets/SolrServlet.javaindex f66d0f234..75d8017ae 100644--- a/source/net/yacy/http/servlets/SolrServlet.java+++ b/source/net/yacy/http/servlets/SolrServlet.java@@ -192,7 +192,8 @@ public class SolrServlet extends HttpServlet {}// get the embedded connector- boolean defaultConnector = mmsp.get("core", CollectionSchema.CORE_NAME).equals(CollectionSchema.CORE_NAME);+ String requestURI = hrequest.getRequestURI();+ boolean defaultConnector = (requestURI.startsWith("/solr/" + WebgraphSchema.CORE_NAME)) ? false : requestURI.startsWith("/solr/" + CollectionSchema.CORE_NAME) || mmsp.get("core", CollectionSchema.CORE_NAME).equals(CollectionSchema.CORE_NAME);mmsp.getMap().remove("core");EmbeddedSolrConnector connector = defaultConnector ? sb.index.fulltext().getDefaultEmbeddedConnector() : sb.index.fulltext().getEmbeddedConnector(WebgraphSchema.CORE_NAME);if (connector == null) throw new ServletException("no core");