Re: DISI semantics

2009-07-16 Thread Shai Erera
Of course - if you don't plan to push this DISI into "uncontrolled land", you can use the previous solution as well. I.e., if you never rely on docId to know whether to start the iteration, and don't pass this DISI to Lucene somehow etc., there's no need to use act or "adhere completely" to the API

Re: DISI semantics

2009-07-16 Thread Yonik Seeley
Agreed - that looks like the optimal solution. -Yonik http://www.lucidimagination.com On Thu, Jul 16, 2009 at 11:40 AM, Uwe Schindler wrote: > OK, that makes sense: So the example of Yonik should be interpreted like > this (I think this is the optimal solution as it does not use an additional > i

RE: DISI semantics

2009-07-16 Thread Uwe Schindler
PM To: java-dev@lucene.apache.org; yo...@lucidimagination.com Subject: Re: DISI semantics Uwe / Yonik, DISI's class javadoc states this: "Implementations of this class are expected to consider {...@link Integer#MAX_VALUE} as an invalid value." Therefore "last" cannot

Re: DISI semantics

2009-07-16 Thread Shai Erera
Uwe / Yonik, DISI's class javadoc states this: "Implementations of this class are expected to consider {...@link Integer#MAX_VALUE} as an invalid value." Therefore "last" cannot be set to MAX_VAL in the above example, if it wants to be a DISI at least. Phew ... that was a long issue. I was able

Re: DISI semantics

2009-07-16 Thread Yonik Seeley
On Wed, Jul 15, 2009 at 6:55 PM, Michael McCandless wrote: > I believe we debated allowing the DISI to return any docID less than > its first real docID, not only -1, as you've done here, but I think > Shai found something wrong with that IIRC... but I can't find this > discussion.  Shai do you rem

Re: DISI semantics

2009-07-15 Thread Michael McCandless
I believe we debated allowing the DISI to return any docID less than its first real docID, not only -1, as you've done here, but I think Shai found something wrong with that IIRC... but I can't find this discussion. Shai do you remember / can you find this past discussion / am I just hallucinating

RE: DISI semantics

2009-07-15 Thread Uwe Schindler
> > This Impl should do it. The problem is, if (last==Integer.MAX_VALUE), > then > > it would break because of overflow. > > That part is OK... I'm more talking about the Javadoc for docID() > which states that it returns >* -1 or {...@link #NO_MORE_DOCS} if {...@link #nextDoc()} or >* {..

Re: DISI semantics

2009-07-15 Thread Yonik Seeley
On Wed, Jul 15, 2009 at 5:47 PM, Uwe Schindler wrote: > This Impl should do it. The problem is, if (last==Integer.MAX_VALUE), then > it would break because of overflow. That part is OK... I'm more talking about the Javadoc for docID() which states that it returns * -1 or {...@link #NO_MORE_DOCS

RE: DISI semantics

2009-07-15 Thread Uwe Schindler
Edit: This Impl should do it. The problem is, if lucene would call nextDoc() if doc is already Integer.MAX_VALUE (what it could do according to docs), then it would break because of overflow. - Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de

RE: DISI semantics

2009-07-15 Thread Uwe Schindler
This Impl should do it. The problem is, if (last==Integer.MAX_VALUE), then it would break because of overflow. - Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -Original Message- > From: ysee...@gmail.com [mailto:ysee...@gmail.com]