Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/solr/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用solr批量分析文档(提取tf idf信息)_Solr - Fatal编程技术网

使用solr批量分析文档(提取tf idf信息)

使用solr批量分析文档(提取tf idf信息),solr,Solr,嗨,我想为文档中的术语提取tf idf值。经过一段时间的搜索,我在示例配置中找到了一个可以执行此操作的请求处理程序:http://localhost:8983/solr/tvrh/?q=id:documentid&qt=tvrh&tv=true&tv.all=true 我想做的是批量分析文档。我就是这么做的: 使用commit=true向solr更新处理程序发送新文档 使用上述url查询术语向量的solr 问题是,插入commit=true的文档大约需要600毫秒,这对于我的用例来说是不可接受的

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

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

  • 使用commit=true向solr更新处理程序发送新文档
  • 使用上述url查询术语向量的solr
  • 问题是,插入commit=true的文档大约需要600毫秒,这对于我的用例来说是不可接受的

    然后,我找到并尝试将其与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>
    
    
    文本
    真的
    我想把这两者结合起来是不可能的


    我怎样才能提高性能呢?有什么建议吗?是否有其他方法获取tf idf值?

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