将插件添加到 Datastax Solr

Add plugin to Datastax Solr

我正在尝试将 Carrot Clustering plugin 添加到 Datastax(v. 4.7.3-1) 中的 Solr(v. 4.10.3)。 当我按照 these 说明并将 JAR 放入 /usr/share/dse/solr/lib 目录时,我确实在 java. class. path 中看到了库,但它没有显示在 plugins/other。 当我使用库时(虽然我看不到它)我收到这个错误:

ERROR [http-10.10.10.10-8983-2] 2016-05-17 06:19:49,955  SolrException.java:150 - org.apache.solr.common.SolrException: Error opening clustering/carrot2/default-attributes.xml
            at org.apache.solr.core.SolrCore.<init>(SolrCore.java:920)
            at com.datastax.bdp.search.solr.core.CassandraCoreContainer.doReload(CassandraCoreContainer.java:904)
            at com.datastax.bdp.search.solr.core.CassandraCoreContainer.create(CassandraCoreContainer.java:324)
            at com.datastax.bdp.search.solr.core.SolrCoreResourceManager.reloadCore(SolrCoreResourceManager.java:434)
            at com.datastax.bdp.search.solr.handler.admin.CassandraCoreAdminHandler.handleReloadAction(CassandraCoreAdminHandler.java:188)
            at org.apache.solr.handler.admin.CoreAdminHandler.handleRequestInternal(CoreAdminHandler.java:225)
            at org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:188)
            at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:163)
            at org.apache.solr.servlet.SolrDispatchFilter.handleAdminRequest(SolrDispatchFilter.java:736)
            at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:258)
            at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)
            at com.datastax.bdp.search.solr.servlet.CassandraDispatchFilter.doFilter(CassandraDispatchFilter.java:108)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at com.datastax.bdp.cassandra.audit.SolrHttpAuditLogFilter.doFilter(SolrHttpAuditLogFilter.java:213)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at com.datastax.bdp.cassandra.audit.SolrHttpAuditLogFilter.doFilter(SolrHttpAuditLogFilter.java:213)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at com.datastax.bdp.search.solr.auth.CassandraAuthorizationFilter.doFilter(CassandraAuthorizationFilter.java:89)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at com.datastax.bdp.search.solr.RepeatablePOSTQueryFilter.doFilter(RepeatablePOSTQueryFilter.java:63)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at com.datastax.bdp.search.solr.auth.DseAuthenticationFilter.doFilter(DseAuthenticationFilter.java:91)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:612)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:503)
            at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.RuntimeException: Error opening clustering/carrot2/default-attributes.xml
            at com.datastax.bdp.search.solr.core.CassandraResourceLoader.getResource(CassandraResourceLoader.java:42)
            at com.datastax.bdp.search.solr.core.CassandraResourceLoader.openResource(CassandraResourceLoader.java:57)
            at org.apache.solr.handler.clustering.carrot2.SolrResourceLocator.getAll(SolrResourceLocator.java:66)
            at org.carrot2.util.resource.ResourceLookup.getAll(ResourceLookup.java:114)
            at org.apache.solr.handler.clustering.carrot2.CarrotClusteringEngine.init(CarrotClusteringEngine.java:145)
            at org.apache.solr.handler.clustering.ClusteringComponent.inform(ClusteringComponent.java:117)
            at org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:655)
            at org.apache.solr.core.SolrCore.<init>(SolrCore.java:903)
            ... 35 more
    Caused by: org.apache.solr.common.SolrException: No resource clustering/carrot2/default-attributes.xml for core solr_core.table, did you miss to upload it?
            at com.datastax.bdp.search.solr.core.SolrCoreResourceManager.getResource(SolrCoreResourceManager.java:811)
            at com.datastax.bdp.search.solr.core.SolrCoreResourceManager.readResource(SolrCoreResourceManager.java:183)
            at com.datastax.bdp.search.solr.core.CassandraResourceLoader.getResource(CassandraResourceLoader.java:38)
            ... 42 more

我错过了什么?

Carrot 告诉您它需要读取该资源。您需要将其上传到 DSE Search 以便被提取。上传并根据您的方便进行调整:

curl -s --data-binary @<xmlFileHere> -H 'Content-type:text/xml; charset=utf-8' http://<hostHere>:8983/solr/resource/<coreNameHere>/clustering/carrot2/default-attributes.xml

确保上传到 DSE 搜索所有需要的资源。 DSE 搜索不会从文件系统中读取它们,您必须上传它们。