【问题标题】:Solr AutoCommit not working with PostgresqlSolr AutoCommit 不适用于 Postgresql
【发布时间】:2015-04-21 04:32:21
【问题描述】:

我将 Solr 4.10.0 与 PostgreSql 9.3 一起使用。我能够使用 data-config.xml 正确配置我的 solr 核心并在数据库中搜索不同的表。但是,我无法设置自动提交功能。每当在表中添加任何行时,我希望它们在 maxTime(1 分钟)之后开始出现在结果中,但这不会发生。我必须通过执行完整的数据导入来显式重建索引,然后一切正常。

我的 solrconfig.xml 是:

  <updateHandler class="solr.DirectUpdateHandler2">

     <autoCommit>
       <maxTime>60000</maxTime>
       <openSearcher>true</openSearcher>
     </autoCommit>

     <autoSoftCommit>
       <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime>
     </autoSoftCommit>

  </updateHandler>

在这里使用 autoCommit 是否需要做一些额外的事情?我也检查了我的日志文件,但没有错误/异常。我错过了什么?

【问题讨论】:

    标签: postgresql solr dataimporthandler autocommit


    【解决方案1】:

    请找到以下链接...

    SOLR: What does an autoSoftCommit maxtime of -1 mean?

    我认为这就是你的情况..

    首先,您可以在标签中看到表达式 ${solr.autoSoftCommit.maxTime:-1}。这允许您使用 Solr 的变量替换。该功能在参考资料中进行了详细描述。如果该变量未被任何这些方式替换,则将 -1 作为该配置的值。 将 commitMaxTime 设置为 -1 会有效地关闭自动提交。

    【讨论】:

    • 我已经尝试完全删除 autoSoftCommit 标记,但没有发现行为有任何变化。无论是否存在,新文档都不会自动添加到索引中。
    猜你喜欢
    • 2013-07-13
    • 1970-01-01
    • 2015-02-14
    • 2020-05-09
    • 1970-01-01
    • 1970-01-01
    • 2013-12-20
    • 2012-04-14
    • 2012-05-13
    相关资源
    最近更新 更多