gpt4 book ai didi

java - solr autoSoftCommit 将打开新的搜索器?

转载 作者:行者123 更新时间:2023-11-30 04:20:40 25 4
gpt4 key购买 nike

这是我的 solrconfig.xml 部分:

 <autoCommit> 
<maxTime>15000</maxTime>
<openSearcher>false</openSearcher>
</autoCommit>
<autoSoftCommit>
<maxTime>1000</maxTime>
</autoSoftCommit>

这是测试添加文档命令:

curl http://localhost:8983/solr/AluSupply/update/json 
-H 'Content-Type:application/json'
-d '[{ "CompanyRoleId": 1,
"Description": " hello test",
"CityId": 1404,
"CompanyId": 32733,
"SupplyTitle": "this is title",
"Id":399998}]'

我观察autoSoftCommit,总是打开一个新的org.apache.solr.search.SolrIndexSearcher,这是否会严重影响性能呢?

这是日志信息:

9117 [commitScheduler-7-thread-1] 信息 org.apache.solr.update.UpdateHandler – 开始提交{,optimize=false,openSearcher=true,waitSearcher=true,expungeDeletes=false,softCommit=true,prepareCommit=假}

9142 [commitScheduler-7-thread-1] 信息 org.apache.solr.search.SolrIndexSearcher – 打开 Searcher@648353f6 main

9143 [commitScheduler-7-thread-1] 信息 org.apache.solr.update.UpdateHandler – end_commit_flush

9144 [searcherExecutor-4-thread-1] INFO org.apache.solr.core.SolrCore – QuerySenderListener 向 Searcher@648353f6 main{StandardDirectoryReader(segments_nf:3441:nrt _194(4.3):C2/1 _19n( 4.3):C1)}

9144 [searcherExecutor-4-thread-1] 信息 org.apache.solr.core.SolrCore – QuerySenderListener 已完成。

9147 [searcherExecutor-4-thread-1] INFO org.apache.solr.core.SolrCore – [AluSupply] 注册新搜索器 Searcher@648353f6 main{StandardDirectoryReader(segments_nf:3441:nrt _194(4.3):C2/1 _19n(4.3):C1)}

最佳答案

当solr执行autoSoftCommit时,它会打开一个新的基于RAMDirectory的SolrIndexSearcher。

所以这不会影响性能。

autoCommit会将文档写入硬盘,并重新打开IndexSearcher,这会严重影响性能。

关于java - solr autoSoftCommit 将打开新的搜索器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17147325/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com