简体   繁体   English

Apache Solr数据源配置错误

[英]Apache Solr Datasource configuration Error

I have installed Apache solr with the Apache Tomcat its working fine and need to configure. 我已经安装了Apache solr和Apache Tomcat,它的工作正常,需要进行配置。 i have added this lines to /collection1/conf/solrcongi.xml file, i just added this line only i didn't create anything for this may i want to configure any other things with this ? 我已经将此行添加到/collection1/conf/solrcongi.xml文件中,我只是添加了这一行,我没有为此创建任何内容,可能要为此配置其他任何内容吗?

<datasource form mysql
<requestHandler name="/dataimport"
class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="config">/home/username/data-config.xml</str>
</lst>
</requestHandler>

Is that correct? 那是对的吗? and configured data-source config as 并将数据源配置配置为

<dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver"url="jdbc:mysql://localhost/database user="dbsync" password="pass"/>
<document name="products">
<entity name="solrtest" query="select * from solrtest">
<field column="ID" name="id" />
<field column="NAME" name="name" />
<field column="MANU" name="manu" />
<field column="WEIGHT" name="weight" />
<field column="PRICE" name="price" />
<field column="POPULARITY" name="popularity" />
<field column="INSTOCK" name="inStock" />
<field column="INCLUDES" name="includes" />
<entity name="feature" query="select description from feature where       item_id='${item.ID}'">
<field name="features" column="description" />
</entity>
<entity name="item_category" query="select CATEGORY_ID from item_category where item_id='${item.ID}'">
<entity name="category" query="select description from category where id = '${item_category.CATEGORY_ID}'">
<field column="description" name="cat" />
</entity>
</entity>
</entity>
</document>
</dataConfig>

am getting core not found error. 正在获取核心未找到错误。 It might be dump question,really am new one to solr. 可能是转储问题,真的是新问题。 Please help to create that datasoure please give to instruction to do that 请帮助创建该数据源,请提供相关说明

You can look at Solr log to see the Java stack trace. 您可以查看Solr日志以查看Java堆栈跟踪。 Usually the problem is obvious in the error message. 通常问题在错误消息中很明显。

I think your problem is in this line: 我认为您的问题出在以下方面:

<str name="config">/home/username/data-config.xml</str>

It should point to your data-config.xml . 它应该指向您的data-config.xml Remove /home/username part if the two files solrconfig and data-config are in the $SOLR_HOME/conf directory. 如果两个文件solrconfigdata-config$SOLR_HOME/conf目录中,请除去/home/username部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM