欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
Lucene : avoiding locking (incremental indexing)

Lucene : avoiding locking (incremental indexing)

2004-11-15       - By Luke Francl

 Back
Reply:     1     2     3     4     5     6     7     8  

This is how I implemented incremental indexing. If anyone sees anything
wrong, please let me know.

Our motivation is similar to John Eichel‘s. We have a digital asset
management system and when users update, delete or create a new asset,
they need to see their results immediately.

The most important thing to know about incremental indexing that
multiple threads cannot share the same IndexWriter, and only one
IndexWriter can be open on an index at a time.

Therefore, what I did was control access to the IndexWriter through a
singleton wrapper class that synchronizes access to the IndexWriter and
IndexReader (for deletes). After finishing writing to the index, you
must close the IndexWriter to flush the changes to the index.

If you do this you will be fine.

However, opening and closing the index takes time so we had to look for
some ways to speed up the indexing.

The most obvious thing is that you should do as much work as possible
outside of the synchronized block. For example, in my application, the
creation of Lucene Document objects is not synchronized. Only the part
of the code that is between your IndexWriter.open() and
IndexWriter.close() needs to be synchronized.

The other easy thing I did to improve performance was batch changes in a
transaction together for indexing. If a user changes 50 assets, that
will all be indexed using one Lucene IndexWriter.

So far, we haven‘t had to explore further performance enhancements, but
if we do the next thing I will do is create a thread that gathers assets
that need to be indexed and performs a batch job every five minutes or
so.

Hope this is helpful,
Luke

本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
blogjava - cap-lucene 學(xué)習筆記 2
lucene中發(fā)生實(shí)時(shí)索引的措施.
locking鎖舞
lucene3.0創(chuàng )建索引及多目錄搜索詳解
一步一步跟我學(xué)習lucene(5)---lucene的索引構建原理
使用Lucene.Net實(shí)現全文檢索
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久