lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nadav Har'El" <>
Subject Re: IndexReader.isCurrent in presence of many files
Date Sun, 13 May 2007 10:24:14 GMT
On Fri, May 11, 2007, Yonik Seeley wrote about "Re: IndexReader.isCurrent in presence of many
> On 5/11/07, Doron Cohen <> wrote:
> >However, isCurrent() may be called before every query.
> That's never going to be a high performance architecture.

Why is that so?
Potentially, isCurrent() could do a couple of disk accesses (and usually
cached by the operating system), which is much faster than running the
actual query, which needs to read a lot more from disk (of course, that
is often cached as well) and do a lot more processing.

If isCurrent() takes 50ms (and I'm just inventing a number here), one way
to look at it is to say that it limits the number of calls to 20 each
second, which rules out high performance. The other way to look at is to
say that each query takes 200ms (say), so that the added 50ms is more-or-less

Of course, the application could, and probably should, have its own mechanism
for specifying when the index needs to be reopened after a background process
modified it. But very often, just using isCurrent() is very convenient, and
works well.

So if isCurrent() can be kept reasonably quick (at least on local disks),
it would be great.

Nadav Har'El                        |       Sunday, May 13 2007, 25 Iyyar 5767
IBM Haifa Research Lab              |-----------------------------------------
                                    |How do you get holy water? Boil the hell           |out of it.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message