我想做的是在 Solr 中索引一些文档并了解它是如何工作的。我已经安装了 Solr 和 Tomcat,并且可以在 localhost:8080/ solr/ admin/ 看到 Solr 管理 UI
现在,我想向索引添加一些文档,我可以知道如何进一步进行吗?我在互联网上发现与此相关的文档非常少。
在教程中 http://lucene.apache.org/solr/tutorial.html #Indexing+Data 他们要求运行 java -jar post.jar solr.xml monitor.xml 命令,但运行后我收到连接拒绝错误,因为它是码头。
安装jetty后,我尝试了telnet:我收到“连接被拒绝”错误
我无法理解问题是什么。
What I want to do is index some documents in Solr and know how it works. I have installed Solr and Tomcat and can see Solr Admin UI at localhost:8080/ solr/ admin/
Now, I want to add some documents to the index, may I know how to proceed further? I find very less documentation on Internet regarding this.
In the tutorial http://lucene.apache.org/solr/tutorial.html#Indexing+Data they asked to run java -jar post.jar solr.xml monitor.xml command but after running that I get connection refused error as it is jetty.
After installing jetty I tried telnet: I get "Connection refused" error
I am not able to understand what the problem is.
发布评论
评论(1)
正如手册所述,有多种方法可以将数据索引到 Solr 中:
post.jar 脚本似乎不适合测试以外的用途。它只是 Solr 客户端的简化实现(仅处理 XML 导入)。
我已成功使用 DIH 和 (PHP) Solr 客户端来实现此目的。前者是 Solr 的扩展,可让您将数据源(在我的例子中为 MySQL)映射到 Solr 索引。以基本形式设置它并不困难,并且在 Solr Wiki 的 DataImportHandler 部分中有很好的解释< /a>.如果您希望在软件级别控制索引过程(或其一部分),您可以拥有一个自定义应用程序,该应用程序使用 现有客户。
我建议您尝试使用这些选项之一。
As the manual states, there are several ways of indexing data into Solr:
The post.jar script doesn't seem to be intended for uses other than testing. It's just a simplified implementation of a Solr client (handling only XML imports).
I've successfully used the DIH and a (PHP) Solr client for this purpose. The former is an extension to Solr that lets you map your data source (in my case MySQL) to the Solr index. Setting it up in the basic form is not difficult and it's quite well explained in the DataImportHandler section of the Solr Wiki. In case you prefer to control your indexing process (or part of it) at the software level, you can have a custom application that makes use one of the existing clients.
I'd suggest you try with one of these options.