SOLR:没有运行SolrCores的错误消息 [英] SOLR:There are no SolrCores running Error Message

查看:259
本文介绍了SOLR:没有运行SolrCores的错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对SOLR非常陌生.

I m very new to SOLR.

我已将以下内容添加到相应的xml文件中.但是,当我尝试在我的计算机中打开服务器页面http://localhost:8080/solr/#/时,它会显示一条消息,提示"There are no SolrCores running.Using the Solr Admin UI currently requires at least one SolrCore.".

I have added the following to the corresponding xml files. But when I try to open my server page that is http://localhost:8080/solr/#/ in my machine it comes up with a message saying that "There are no SolrCores running.Using the Solr Admin UI currently requires at least one SolrCore.".

solarconfig.xml: [请求处理程序]

solarconfig.xml: [the request handler]

 <requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
       <lst name="defaults">
        <str name="config">C:/Solr/collection1/conf/data-config.xml</str>
    </lst>
  </requestHandler>

data-config.xml

<dataConfig>
  <dataSource type="JdbcDataSource" driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://127.0.0.1:8080;databaseName=myDB" user="xxx" password="xxx" />
    <document>
      <entity name="sep" processor="SolrEntityProcessor" url="http://127.0.0.1:8080/solr/#/collection1" query="*:*"/>
      <entity name="Data" query="select id, firstname, lastname from tblPlayers">
        <field column="DocumentId" name="DocumentId" />
        <field column="Data" name="Data" />
      </entity>
    </document>
</dataConfig>

我想requestHandler只是指向data-config.xml,所以我的data-config.xml出了什么问题.

I guess the requestHandler just points to the data-config.xml, so is there anything wrong with my data-config.xml.

这是我必须在与数据库有关的data-config.xml中指定的端口.

And which is the port that I ve to specify in the data-config.xml relating to the DB.

谢谢.

推荐答案

该错误消息与数据导入无关.它告诉您至少需要一个核心. 在我看来,您使用的是Solr4.x.如果是这样,您可以在下载包中找到有效的配置(核心称为"collection1").还有一个多核示例.

The error message has nothing to do with dataimport. it tells you that you need to have at least one core. It seems to me you're using a solr 4.x. If so, you can find a valid configuration in the download bundle (the core is called "collection1"). There's a multicore example too.

关于数据导入,查看文件尚不清楚我想知道有关数据库端口的问题...如果您想知道数据库连接详细信息放在哪里,答案是"url"属性数据源元素...您必须指定一个有效的jdbc url,该URL至少应包含数据库地址,端口和/或别名.

Regarding the dataimport, looking at the file it's not clear to me what you want to know with your question about database port...if you were wondering about where put database connection details well, the answer is the "url" attribute of the datasource element...you must specjfy a valid jdbc url, which is supposed to contain at least database address, port and / or alias.

这篇关于SOLR:没有运行SolrCores的错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆