1.download apache solr
http://lucene.apache.org/solr/index.html
2.import apache-solr-xx.war into your eclipse
3.copy solr config (apache-solr-3.5.0\client\ruby\solr-ruby\solr\conf) into your dynamic web project
your project should look something like this
4. define solr home in your web.xml
add the following in your web.xml
the marked text is the location of your solr config in your web project
<env-entry>
<env-entry-name>solr/home</env-entry-name>
<env-entry-value>C:/LeoProject/apache-solr-3.5.0/solr</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
5. now you can run your solr in eclipse with tomcat
沒有留言:
張貼留言