Re: Help with Multiple Readers, 1 Writer scenario

Some time back in September, [sorry to be so slow], Dave wrote:

When you open an IndexReader on the index it is opened up on
that particular version (or state) of the index. So any
operations on the IndexReader (like searches) will only show
what was in the index at the time you opened it. Any modifications
to the index (usually through and IndexWriter) that occur after
you open the IndexReader will not appear in your searches.

So to keep searches up to date you need to close and reopen your
IndexReader every time you commit changes to the index.

Would it be possible to enhance IndexReader to report the “version” of
the index it is using, and to report if a newer version of the index
exists, eg perhaps #version and #current_version?

This would allow a long running IndexReader to detect that a new index
version is available, which is a problem if the IndexWriter updates the
index from another process. For example, I am planning to divide my
application into two apps, one which services reader requests, and the
other which periodically updates the index if needed.

Kind Regards


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs