[
https://issues.apache.org/jira/browse/LUCENE-1516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael McCandless updated LUCENE-1516:
---------------------------------------
Attachment: LUCENE-1516.patch
New patch attached. All tests pass. Back-compat tests pass with no
changes.
I made a number of changes, added asserts, cleaned things up, added
javadocs, CHANGES entry, etc.
I try to consistently refer to this as "near real-time search".
Calling it realtime is overstating it, especially when you compare it
to what "realtime operating systems" do.
I also added IndexWriter.setMergedSegmentWarmer(..) and abstract base
class so the caller can have a merged segment warmed before it's
committed to the index. This is important for reducing turnaround
time after merges are completed; eg it means you can go ahead adding
new docs/deletes, and opening new readers, while the merged segment is
being warmed.
Net/net I think the approach here is sound, and it's a good step
forward. I think we can get this in for 2.9.
But, I added a few nocommits that we still need to figure out.
Otherwise this is close to committable, though I'd like to let it age
for a while so people can look/test.
We also still need to pursue in-memory transactional data structures
for representing deletes/norms (LUCENE-1526 is already open for
this, and it should not block this issue).
Next up I plan to run some basic tests to see what the "typical" delay
is for opening a near-realtime reader...
> Integrate IndexReader with IndexWriter
> ---------------------------------------
>
> Key: LUCENE-1516
> URL: https://issues.apache.org/jira/browse/LUCENE-1516
> Project: Lucene - Java
> Issue Type: Improvement
> Affects Versions: 2.4
> Reporter: Jason Rutherglen
> Assignee: Michael McCandless
> Priority: Minor
> Fix For: 2.9
>
> Attachments: LUCENE-1516.patch, LUCENE-1516.patch, LUCENE-1516.patch,
> LUCENE-1516.patch, LUCENE-1516.patch, LUCENE-1516.patch, LUCENE-1516.patch,
> LUCENE-1516.patch, LUCENE-1516.patch, LUCENE-1516.patch, LUCENE-1516.patch,
> LUCENE-1516.patch, LUCENE-1516.patch, LUCENE-1516.patch, LUCENE-1516.patch,
> LUCENE-1516.patch, LUCENE-1516.patch, LUCENE-1516.patch, LUCENE-1516.patch,
> LUCENE-1516.patch, LUCENE-1516.patch, LUCENE-1516.patch, LUCENE-1516.patch,
> LUCENE-1516.patch
>
> Original Estimate: 672h
> Remaining Estimate: 672h
>
> The current problem is an IndexReader and IndexWriter cannot be open
> at the same time and perform updates as they both require a write
> lock to the index. While methods such as IW.deleteDocuments enables
> deleting from IW, methods such as IR.deleteDocument(int doc) and
> norms updating are not available from IW. This limits the
> capabilities of performing updates to the index dynamically or in
> realtime without closing the IW and opening an IR, deleting or
> updating norms, flushing, then opening the IW again, a process which
> can be detrimental to realtime updates.
> This patch will expose an IndexWriter.getReader method that returns
> the currently flushed state of the index as a class that implements
> IndexReader. The new IR implementation will differ from existing IR
> implementations such as MultiSegmentReader in that flushing will
> synchronize updates with IW in part by sharing the write lock. All
> methods of IR will be usable including reopen and clone.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]