[英]How to integrate apache solr with eclipse and Apache tomcat
It is very difficult to get started with apache solr in eclipse.I am new to apache solr was trying to integrate it with eclipse so that I can develop web application for same.I have searched lot of link but nothing useful.I have downloaded apache solr 5.0 but not able to get integrate with eclipse in windows 在eclipse中开始使用apache solr是非常困难的。我是apache solr的新手,我试图将其与eclipse集成以便我可以为其开发Web应用程序。我搜索了很多链接但没有用。我已经下载了apache solr 5.0,但无法与Windows中的eclipse集成
Please provide any step wise step solution and also provide some good examples. 请提供任何逐步的解决方案,并提供一些良好的示例。
Since you said "I am new to Solr" I think you don't need to load it in Eclipse. 因为您说过“我对Solr还是陌生的”,所以我认为您不需要在Eclipse中加载它。 Solr is a kind of service so unless you want to develop some customisation (eg plugin, search component, parser) which is an advanced topic, it can be started externally from command line.
Solr是一种服务,因此除非您想开发一些高级主题(例如插件,搜索组件,解析器),否则可以从命令行从外部启动它。
Then, in Eclipse, you may want to 然后,在Eclipse中,您可能想要
But again, at least for a primer usage, I don't see the need to import and manage it from Eclipse. 但是同样,至少对于入门而言,我认为不需要从Eclipse导入和管理它。 A compromise could be an external launch configuration (in Eclipse) that hides the command line (for starting and stopping Solr)
一个妥协可能是隐藏命令行(用于启动和停止Solr)的外部启动配置(在Eclipse中)。
It is very easy if you know all steps.Here I am providing all steps one by one 如果您知道所有步骤,这非常容易。在这里,我一步一步地提供所有步骤
solr.xml solr.xml
<?xml version='1.0' encoding='UTF-8'?>
<context docBase="C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/solr.war" debug="0" crossContext="true" >
<environment name="solr" type="java.lang.String" value="/Tomcat 7.0/webapps/" override="true"></environment>
</context>
7. Inside tomcat-->webapp-->solr-->WEB-INF-->web.xml set Environment entry it will look like this 7.在tomcat-> webapp-> solr-> WEB-INF-> web.xml设置环境条目中,它看起来像这样
<env-entry>
<env-entry-name>solr</env-entry-name>
<env-entry-value>C:\solr</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
Now you are all set with apache solr use enjoy 现在,您已全部使用apache solr进行使用
Since you have asked about Solr5.0, Beginning with Solr 5.0, Support for deploying Solr as a WAR in servlet containers like Tomcat is no longer supported. 既然您已经询问过Solr5.0,从Solr 5.0开始,就不再支持将Solr作为WAR部署在Tomcat之类的servlet容器中的支持。 For information on how to install Solr as a standalone server, please see Installing Solr- https://cwiki.apache.org/confluence/display/solr/Installing+Solr
有关如何将Solr安装为独立服务器的信息,请参阅安装Solr- https://cwiki.apache.org/confluence/display/solr/Installing+Solr
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.