Solr部署摘要 博客分类: Java
程序员文章站
2024-02-04 15:31:10
...
Solr官网:http://lucene.apache.org/solr/
D:\workspace\apache-tomcat-6.0.35\conf\Catalina\localhost\solr.xml
D:\workspace\projectname\html\solr\npscore\conf\solrconfig.xml追加
D:\workspace\projectname\html\solr\npscore\conf\data-config.xml
D:\workspace\apache-solr-3.3.0\dist 别忘记将数据库jar扔个这里面
solr索引重建
http://localhost:8983/solr/npscore/dataimport?command=full-import
http://localhost:8983/solr/npscore/dataimport?command=full-import&clean=false
tomcat配置server.xml增加默认监听solr端口8983
D:\workspace\apache-tomcat-6.0.35\conf\Catalina\localhost\solr.xml
<Context docBase="D:/workspace/apache-solr-3.3.0/dist/apache-solr-3.3.0.war" debug="0" crossContext="true" > <Environment name="solr/home" type="java.lang.String" value="D:/workspace/projectname/html/solr" override="true" /> </Context>
D:\workspace\projectname\html\solr\npscore\conf\solrconfig.xml追加
<lib dir="D:/workspace/apache-solr-3.3.0/dist" regex="apache-solr-dataimporthandler-\d.*\.jar" /> <lib dir="D:/workspace/apache-solr-3.3.0/dist" regex="ojdbc\d.*\.jar" /> <requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler"> <lst name="defaults"> <str name="config">data-config.xml</str> </lst> </requestHandler>
D:\workspace\projectname\html\solr\npscore\conf\data-config.xml
<?xml version="1.0" encoding="UTF-8"?> <dataConfig> <dataSource type="JdbcDataSource" driver="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@localhost:1521:xe" user="******" password="******"/> <document> <entity name="article" query="select * from article"> </entity> </document> </dataConfig>
D:\workspace\apache-solr-3.3.0\dist 别忘记将数据库jar扔个这里面
solr索引重建
http://localhost:8983/solr/npscore/dataimport?command=full-import
http://localhost:8983/solr/npscore/dataimport?command=full-import&clean=false
tomcat配置server.xml增加默认监听solr端口8983
<Connector URIEncoding="UTF-8" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" maxHttpHeaderSize="8192" maxSpareThreads="75" maxThreads="150" minSpareThreads="25" port="8983" redirectPort="8443"/>
下一篇: 8.18 博客分类: Java
推荐阅读
-
8.24 博客分类: Java
-
Solr部署摘要 博客分类: Java
-
8.18 博客分类: Java
-
8.24 博客分类: Java
-
已前的学习笔记java lesson 10 博客分类: java javamembervariablereference
-
ant打包,解决Eclipse环境下lib自定义变量部署问题 博客分类: java anteclipselibvariable
-
spring aop中实现变更方法参数以及annotation 博客分类: java 技术 springaopannotationmethodvariable
-
java reflect:打印对象内容 很好的调试工具(转载收藏) 博客分类: java工具 java工具
-
在heroku上部署rails3应用 博客分类: ROR Ruby Rails Heroku
-
会话COOKIE? 持久COOKIE? 博客分类: JAVA 浏览器TomcatServletIEFirefox