solr的软提交和硬提交
来源:互联网 发布:cg软件有哪些 编辑:程序博客网 时间:2024/05/17 06:00
在solr4.0中增加了软提交,加快了index速度,具体如下:
A commit operation makes index changes visible to new search requests.A hard commit also calls fsync on the index files to ensure they have been flushed to stable storage and no data loss will result from a power failure.
A soft commit is much faster since it only makes index changes visible and does not fsync index files or write a new index descriptor. If the JVM crashes or there is a loss of power, changes that occurred after the lasthard commit will be lost. Search collections that have near-real-time requirements (that want index changes to be quickly visible to searches) will want to soft commit often but hard commit less frequently.
An optimize is like a hard commit except that it forces all of the index segments to be merged into a single segment first. Depending on the use cases, this operation should be performed infrequently (like nightly), if at all, since it is very expensive and involves reading and re-writing theentire index. Segments are normally merged over time anyway (as determined by the merge policy), and optimize just forces these merges to occur immediately.
Example:
<commit/><optimize/>
Optional attributes for "commit" and "optimize"
waitFlush = "true" | "false" — default is true — block until index changes are flushed to diskSolr1.4 At least in Solr 1.4 and later (perhaps earlier as well), this command has no affect. InSolr4.0 it will be removed.
waitSearcher = "true" | "false" — default is true — block until a new searcher is opened and registered as the main query searcher, making the changes visible.
softCommit = "true" | "false" — default is false — perform a soft commit - this will refresh the 'view' of the index in a more performant manner, but without "on-disk" guarantees.Solr4.0
Optional attributes for "commit"
expungeDeletes = "true" | "false" — default is false — merge segments with deletes away.Solr1.4
Optional attributes for "optimize"
maxSegments = N — default is '1' — optimizes down to at most this number of segmentsSolr1.3
Example of "commit" and "optimize" with optional attributes
<commit waitSearcher="false"/><commit waitSearcher="false" expungeDeletes="true"/><optimize waitSearcher="false"/>
- solr的软提交和硬提交
- solr的硬提交软提交区别
- 理解SolrCloud的事务日志、软提交和硬提交
- solr的软硬提交
- solr的三种提交方式
- solr提交oracle数据
- solr索引提交方式
- post提交和get提交的区别
- post提交和get提交的区别
- GET提交和POST提交的区别
- get提交和post提交的区别
- get提交和post提交的区别
- submit提交和button提交的区别
- get提交和post提交的区别
- get提交和post提交的区别
- solr 自动提交autocommit(原创)
- solr开发,提交索引数据的几种方式
- 表单的提交和获取
- Weblogic10g部署web项目报错:com.ctc.wstx.stax.WstxInputFactory cannot be cast to javax.xml.stream.XMLInputF
- LinearLayout按下(pressed)或获取焦点(focused)时背景设置不同颜色或图片
- delete与delete[]的区别
- 你是否适合微信营销?
- 关于Spring配置中transactionAttributes的意义
- solr的软提交和硬提交
- WebView
- php ajax提交数据
- 无痛不快,无苦何甜,活着,本就是一种修行。
- Library Cache Lookup
- 最优秀的5个Linux文本编辑器
- 连接列值
- 昔日的教育界的霸主,今天能否成功转型?新东方未来的路在何方?
- 线性表的存储以及相关操作实现