这是我的 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] INFO org.apache.solr.update.UpdateHandler - 开始提交{,优化=false,openSearcher=true,waitSearcher=true,expungeDeletes=false,softCommit=true,prepareCommit=false}
9142 [commitScheduler-7-thread-1] 信息 org.apache.solr.search.SolrIndexSearcher – 打开 Searcher@648353f6 主要
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)}