diff --git a/source/net/yacy/http/Jetty8HttpServerImpl.java b/source/net/yacy/http/Jetty8HttpServerImpl.java index 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= servlet htrootContext.addServlet(YaCyProxyServlet.class,"/proxy.html"); diff --git a/source/net/yacy/http/servlets/SolrServlet.java b/source/net/yacy/http/servlets/SolrServlet.java index 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");