dongqu5650 2014-11-20 11:44
浏览 33
已采纳

如何使用mysql优化solr索引

I am using Mysql for indexing data to SOLR. Earlier the data was less, so the indexing happened quickly without any lag. Now my data contains almost 3 million rows and the mysql query always times out and because of that SOLR can't index the data accordingly.Is there any way to index SOLR fastly using mysql or can do any tweaking in SOLR? Please help.

  • 写回答

1条回答 默认 最新

  • dsiuz86842 2014-11-20 20:07
    关注

    If you're not using incremental / delta indexing, you should start doing that instead. That way only the rows that have changed since the last index ran will be indexed again, allowing you to lessen the impact and the amount of rows from MySQL.

    In addition the JDBCDataSource (which I guess you're using) supports the batchSize parameter, which tells the JDBC driver to limit the amount of documents in each query - and issue more than one query instead.

    You should also take care to have usable indexes on your data if you're performing any sort of filtering on the SQL content when retrieving it (such as for a delta import).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)
  • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计
  • ¥15 Arduino无法同时连接多个hx711模块,如何解决?