lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Radomir Mladenovic <radomi...@gmail.com>
Subject Re: patch: adding IndexReader.isCurrent()
Date Mon, 06 Jun 2005 07:38:58 GMT
Method isCurrrent() is a useful addition and I'm glad fix with
timestamp use for initial version is finally commited. However,
although version is not meaningful, I believe it should stay in API...

The software I'm working on is using pair "version, document_id" as a
fast reference to lucene document - if version is not current we have
to make an additional query first in order to get document id. Without
version information method isCurrent() is useless in this context as
we don't know which version of search results client has.

Here's one simple example... Let's say we have web application that's
paging search results (20 or so per page) and we re-run query for each
"next results page" request. Without version information, how can we
eventually warn user that index changed between its two "next results
page" requests?

So I think getCurentVersion() should stay and (as I suggested earler)
would like to see getVersion() added to IndexReader.

In addition, shouldn't SigmentInfos.readCurrentVersion() rely on
commit lock when reading segments file? Could someone with deeper
understanding of lucene internals check this?

Radomir


On 6/4/05, Otis Gospodnetic <otis_gospodnetic@yahoo.com> wrote:
> Well, Radomir, the person who asked about that method should be on
> java-dev@, so I'll assume he'll speak up if he needs that method.  I
> think isCurrent() is good to go.
> 
> Otis
> 
> 
> --- Daniel Naber <lucenelist@danielnaber.de> wrote:
> 
> > On Friday 03 June 2005 23:51, Otis Gospodnetic wrote:
> >
> > > Isn't version a time stamp now?
> >
> > It starts as a time stamp, but then +1 is added for each change. So
> > that
> > number has no useful meaning I think. It's only useful for
> > comparison. Or
> > am I missing something?
> >
> > Regards
> >  Daniel
> >
> > --
> > http://www.danielnaber.de
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-dev-help@lucene.apache.org
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message