【问题标题】:Solr in tomcat 7Tomcat 7 中的 Solr
【发布时间】:2013-11-03 19:21:05
【问题描述】:

我似乎无法在互联网上的任何地方找到此信息。所以也许有人可以帮忙。

这是我的配置:

<solr persistent="false">

  <!--
  adminPath: RequestHandler path to manage cores.  
    If 'null' (or absent), cores will not be manageable via request handler
  -->
  <cores adminPath="/admin/cores" defaultCoreName="collection1">
     <core name="collection1" instanceDir="." />
  </cores>

solr 安装到 /opt/solr/ 也是 solr.xml 文件所在的位置。它部署在 tomcat7 上,我可以直接在 localhost:8080/solr 访问主页,但是,我看不到如何添加内核,当我浏览到 localhost:8080/solr/admin 时,它显示以下错误,即一个我真的无法超越:

HTTP Status 404 - missing core name in path
type Status report
message missing core name in path
description The requested resource is not available.
Apache Tomcat/7.0.42

它不够冗长,我无法真正知道到底出了什么问题,作为第一次使用的用户,这很令人困惑。想法?

【问题讨论】:

    标签: java tomcat solr centos6


    【解决方案1】:

    这是我沙箱中的 solr.xml 示例。希望对您有所帮助:

    <?xml version="1.0" encoding="UTF-8" ?>
    <solr persistent="true" sharedLib="lib">
      <cores hostPort="8080"
             hostContext="solr"
             adminPath="/admin/cores">
        <core name="yourcorenamehere"
              instanceDir="coredirectoryhere"
              dataDir="data"
              schema="schema.xml"
              config="solrconfig.xml"
              loadOnStartup="true"
              transient="false" />
      </cores>
    </solr>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-07-09
      • 2011-11-22
      • 2016-06-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多