Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.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
Performance 为什么在Solr4.10.x中索引更新要花费这么多时间?_Performance_Indexing_Solr_Lucene - Fatal编程技术网

Performance 为什么在Solr4.10.x中索引更新要花费这么多时间?

Performance 为什么在Solr4.10.x中索引更新要花费这么多时间?,performance,indexing,solr,lucene,Performance,Indexing,Solr,Lucene,我使用的是Solr4.10.3。我必须更新大约100000个索引。查询类似于每个文档 curl 'localhost:8900/solr/update?commit=true' -H 'Content-type:application/json' -d '[{"id":"org.wikipedia.ur:http/wiki/%D9%85%DB%8C%D9%84","group":{"set":"wiki"}}]' 开始更新此索引后,12小时后,仅更新48000个文档 问题在哪里。有谁能指导我吗

我使用的是Solr4.10.3。我必须更新大约100000个索引。查询类似于每个文档

curl 'localhost:8900/solr/update?commit=true' -H 'Content-type:application/json' -d '[{"id":"org.wikipedia.ur:http/wiki/%D9%85%DB%8C%D9%84","group":{"set":"wiki"}}]'
开始更新此索引后,12小时后,仅更新48000个文档


问题在哪里。有谁能指导我吗?

您正在对每个curl请求使用硬提交。这迫使solr在每次提交时将用于存储索引的segment lucene数据结构推送到磁盘。Solr总是将数据写入新的段中,看起来它迫使它创建100K段

Solr使用mergePolicy作为TieredMergePolicy,使用mergeFactor作为10个默认参数,每当Solr有10个几乎相同大小的段时,这些参数都会合并。此合并进程使用ConcurrentMergeScheduler实现在后台运行


这个合并过程是CPU密集型的。在这里,您可以使用软提交而不是硬提交。这可能会对您有所帮助。

您正在对每个curl请求使用硬提交。这迫使solr在每次提交时将用于存储索引的segment lucene数据结构推送到磁盘。Solr总是将数据写入新的段中,看起来它迫使它创建100K段

Solr使用mergePolicy作为TieredMergePolicy,使用mergeFactor作为10个默认参数,每当Solr有10个几乎相同大小的段时,这些参数都会合并。此合并进程使用ConcurrentMergeScheduler实现在后台运行


这个合并过程是CPU密集型的。在这里,您可以使用软提交而不是硬提交。这可能会对您有所帮助。

您应该像这样使用软提交

curl 'localhost:8900/solr/update?softCommit=true' -H 'Content-type:application/json' -d '[{"id":"org.wikipedia.ur:http/wiki/%D9%85%DB%8C%D9%84","group":{"set":"wiki"}}]'

您应该像这样使用软提交

curl 'localhost:8900/solr/update?softCommit=true' -H 'Content-type:application/json' -d '[{"id":"org.wikipedia.ur:http/wiki/%D9%85%DB%8C%D9%84","group":{"set":"wiki"}}]'

在软提交的情况下,上面的问题是什么?谢谢,第二个答案给出了我想要的need@Shafiq我想我已经向你们解释了solr的内部结构。我向您说明了问题的原因,并向您提出了建议,以及如何做到这一点。在软提交的情况下,上面的查询将是什么?谢谢,第二个答案给出了我想要的need@Shafiq我想我已经向你们解释了solr的内部结构。我向你解释了问题的原因,并建议你如何解决。