Index a DB table directly into Solr
来源:互联网 发布:无线淘宝收藏链接 编辑:程序博客网 时间:2024/06/08 06:11
1. Start solr java -jar start.jar2. Edit your solrconfig.xml to add the request handler<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler"><lst name="defaults"> <str name="config">data-config.xml</str></lst></requestHandler>3. Create a data-config.xml file as follows and save it to the conf dir<dataConfig><dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/dbname" user="root" password="111111"/> <document><entity name="id" query="select id,name from mytable"></entity> </document> </dataConfig>note: need to creat a DB named dbname and also create a table named mytable with property id and name.add some data in the table. like "1 , testuser"4. Put the url in the browser. "http://localhost:8983/solr/dataimport?command=full-import"5. Use slor admin to select import datas. "http://localhost:8983/solr/select/?q=testuser&version=2.2&start=0&rows=10&indent=on" You can find the result.
Please click the url http://wiki.apache.org/solr/DIHQuickStart for more information
- Index a DB table directly into Solr
- Query index for a table
- FND:How to create a link in IE favorite to directly login into apps
- jquery insert a table into div
- DB Index
- Import CSV file directly into MySQL
- Cannot merge new index 66501 into a non-jumbo instruction
- Cannot merge new index 67361 into a non-jumbo instruction
- Cannot merge new index 65636 into a non-jumbo instruction
- cannot merge new index 65555 into a non-jumbo instruction!
- Cannot merge new index 65553 into a non-jumbo instruction
- BUG_Cannot merge new index 65810 into a non-jumbo instruction!
- Table index
- Mysql select data from one table into a new one
- High Waits on 'Db File Sequential Read' Due to Table Lookup Following Index Access
- Drag & Drop files directly into their SharePoint document libraries
- Insert data into a table using table variables and cross join
- describe intention directly before ask a question
- java图片处理——多张图片合成一张Gif图片并播放或Gif拆分成多张图片
- 九度oj 第3题 旋转数组的最小数字 何海涛:《剑指Offer:名企面试官精讲典型编程题》
- JSON转NSDictionary后遍历多维的NSDictionary
- YUV420数据存储
- apache编译安装完成后的服务启动设置
- Index a DB table directly into Solr
- 如何使用NSOperations和NSOperationQueues(一)
- windbg dump分析之分析命令之二
- 2012安卓巴士开发者沙龙成都站大家抓紧报名
- QQ伤感日志_一点点揭开这撕心裂肺的伤
- #pragma DATA_SECTION
- Ubuntu KVM Client OS创建 一
- 让WebApp在浏览器中直接获得原生应用体验 - 基于Rexsee开发平台的UP移动浏览器发布测试
- 代码实现Apk的安装与卸载