当前位置:Gxlcms > 数据库问题 > Solr5.5.5 学习 二 配置数据库

Solr5.5.5 学习 二 配置数据库

时间:2021-07-01 10:21:17 帮助过:22人阅读

<dataConfig> 2 <dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/test" user="root" password="jimw"/> 3 <document> 4 <entity name="test" query="select * from t_customer"> 5 <field column="id" name="id" /> 6 <field column="name" name="name" /> 7 </entity> 8 </document> 9 </dataConfig> jdbc

 

配置所需要query的字段 conf vim managed-schema  

技术分享图片

  配置完成之后,重启solr ? solr-5.5.5 ./bin/solr restart Sending stop command to Solr running on port 8983 ... waiting 5 seconds to allow Jetty process 3753 to stop gracefully. Waiting up to 30 seconds to see Solr running on port 8983 [|] Started Solr server on port 8983 (pid=10500). Happy searching!   重启完成,就可以去执行查询了   技术分享图片   执行完成后返回 技术分享图片   solr有个好处就是你可以debug执行。并且返回你想要的数据. 到jimtest查询数据并且返回数据则表示成功了   技术分享图片   参考文献:https://gist.github.com/maxivak/3e3ee1fca32f3949f052

Solr5.5.5 学习 二 配置数据库

标签:host   是你   gis   core   文件   lan   entity   solr   vim   

人气教程排行