Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.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
Apache solr-在完全提交之前防止更改_Apache_Solr_Documents - Fatal编程技术网

Apache solr-在完全提交之前防止更改

Apache solr-在完全提交之前防止更改,apache,solr,documents,Apache,Solr,Documents,我的solr设置缺少文档。 我的问题是 在提交过程中,前端可以看到部分更改,例如,如果提交了2000个文档,则前端将仅显示2000个文档,经过一段时间5k、10k…直到完全提交完成 我想改变这种行为,只有在完全提交之后,更改才可见,直到完全提交完成,solr应该使用旧的索引/数据 Solr使用了近实时搜索的概念 我以前没有更改过默认设置,但您需要研究一下:在您的Solr(4)中,有(或可能有)一个名为“自动提交”的部分 <autoCommit> <maxD

我的solr设置缺少文档。 我的问题是 在提交过程中,前端可以看到部分更改,例如,如果提交了2000个文档,则前端将仅显示2000个文档,经过一段时间5k、10k…直到完全提交完成


我想改变这种行为,只有在完全提交之后,更改才可见,直到完全提交完成,solr应该使用旧的索引/数据

Solr使用了近实时搜索的概念

我以前没有更改过默认设置,但您需要研究一下:

在您的Solr(4)中,有(或可能有)一个名为“自动提交”的部分

    <autoCommit>
       <maxDocs>10000</maxDocs> <!-- maximum uncommited docs before autocommit triggered -->
       <maxTime>15000</maxTime> <!-- maximum time (in MS) after adding a doc before an autocommit is triggered -->
       <openSearcher>false</openSearcher> <!-- SOLR 4.0.  Optionally don't open a searcher on hard commit.  This is useful to minimize the size of transaction logs that keep track of uncommitted updates. -->
    </autoCommit>

10000
15000
假的
我读了你的问题,你提交了很多文件,所以你不能把它们保存在内存中,需要将它们提交到磁盘。但在它们全部被索引之前,您不希望它们可见

因此,与其每X个文档进行一次显式提交,不如设置一个自动提交部分,但要确保openSearcherfalse。这样,活动搜索程序将继续指向原始提交点。然后,在完成所有操作后,执行完整的手动提交。这些变化应该在那时变得可见

只需确保您没有autoSoftCommit部分,因为该部分对您毫无用处。这是为那些希望尽快看到新文档的人准备的(openSearcher设置为true)