[英]how to import and index data from database in solr 6.2.1(New to solr)
I am trying to index data from MySql,bt when execute it from solr admin, it only shows: Request:1, Fetched:0, Skipped:0 我正在尝试从solr admin执行MySql,bt的数据索引时,它仅显示:Request:1,Fetched:0,Skipped:0
New to solr. Solr的新手。 Please help.
请帮忙。
Take a look at your log, from the Solr Admin Panel, if there's any hint about the indexing process, at the url /solr/#/~logging if you see any error while trying to importing documents, clicking on the log line will give you additional information about the error. 在Solr Admin面板上查看日志,如果有关于索引编制过程的任何提示,请在url / solr /#/〜logging上查看是否在尝试导入文档时出现任何错误,单击日志行将显示您将获得有关该错误的其他信息。
Since you're mentioning Solr Admin I guess you're using the Data Import Handler. 因为您提到的是Solr Admin,所以我猜您正在使用数据导入处理程序。
Here is a very (very!) basic configuration, assuming you're indexing from mysql: 这是一个非常非常非常基本的配置,假设您正在从mysql进行索引:
<dataConfig>
<dataSource type="JdbcDataSource"
driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://yourhost:3306/db_name"
user="mysql_user"
password="mysql_password"/>
<document>
<entity name="mydocuments"
query="select id, field1, field2, field3 from yourtable;">
</entity>
</document>
</dataConfig>
When running the indexer, check these two checkboxes: 运行索引器时,请选中以下两个复选框:
Commit: to execute a commit after the import
Auto-Refresh Status: to updated the import stats while it's running
Also, check if in your schema is defined a field version 另外,请检查您的架构中是否定义了字段版本
<field name="_version_" type="long" indexed="true" stored="true" multiValued="false"/>
Please let me know if it helped. 请让我知道是否有帮助。
this link quick start is a quick guide from apache solr which should help. 该链接快速入门是apache solr的快速指南,应该会有所帮助。 There are different index samples.
有不同的索引样本。 A link to the HTTP GUI interface is also mentioned.
还提到了HTTP GUI界面的链接。 There you can take a look at the cores (indices) and configurations.
您可以在那里查看核心(索引)和配置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.