【问题标题】:Batch analysing documents with solr (extracting tf idf information)用solr批量分析文档(提取tf idf信息)
【发布时间】:2013-03-01 12:35:36
【问题描述】:

您好,我想提取文档中术语的 tf-idf 值。经过一番搜索,我在示例配置中找到了一个可以执行此操作的请求处理程序:http://localhost:8983/solr/tvrh/?q=id:documentid&qt=tvrh&tv=true&tv.all=true

我想做的是批量分析文档。这就是我所做的:

  1. 使用 commit=true 将新文档发送到 solr 更新处理程序
  2. 使用上述网址查询术语向量的 solr

问题是插入带有 commit=true 的文档大约需要 600 毫秒,这对于我的用例来说是无法接受的。

然后我找到了http://wiki.apache.org/solr/RealTimeGet 并尝试将其与 termvector 请求处理程序结合起来:

<requestHandler name="/tvrh" class="solr.RealTimeGetHandler" startup="lazy">
    <lst name="defaults">
      <str name="df">text</str>
      <bool name="tv">true</bool>
    </lst>
    <arr name="last-components">
      <str>tvComponent</str>
    </arr>
  </requestHandler>

但是当我尝试查询处理程序时,我得到了这个作为响应:http://pastebin.com/KtB7DBSv 我想将这两者结合起来是不可能的?

无论如何,我怎样才能提高性能?有什么建议?是否有另一种获取 tf idf 值的方法?

【问题讨论】:

    标签: solr


    【解决方案1】:

    我没有找到问题中具体问题的解决方案,但发现使用softCommit=true要快得多。

    【讨论】:

      猜你喜欢
      • 2012-02-29
      • 1970-01-01
      • 2020-08-27
      • 2017-09-17
      • 1970-01-01
      • 2021-02-10
      • 2017-09-27
      • 2018-05-27
      • 2011-02-24
      相关资源
      最近更新 更多