Re: Under what circumtances, termsEnum's next(), or seekExact(), o seekCeli() is more efficient?

2014-03-07 Thread hao yan
Hey, Michael thanks! it is close to what I think. hao On Fri, Mar 7, 2014 at 9:55 AM, Michael McCandless < luc...@mikemccandless.com> wrote: > On Wed, Mar 5, 2014 at 4:34 PM, hao yan wrote: > > Hi, Michael > > > > 1.We find actually both are costly. I am not sure what is the difference > btw

Re: Under what circumtances, termsEnum's next(), or seekExact(), o seekCeli() is more efficient?

2014-03-07 Thread Michael McCandless
On Wed, Mar 5, 2014 at 4:34 PM, hao yan wrote: > Hi, Michael > > 1.We find actually both are costly. I am not sure what is the difference btw > " > first next only once + seekExact from then on" and "always seekExact". I > mean, the first call of "next" and the first call of seekExact, they are >

Re: Under what circumtances, termsEnum's next(), or seekExact(), o seekCeli() is more efficient?

2014-03-05 Thread hao yan
Hi, Michael 1.We find actually both are costly. I am not sure what is the difference btw " first next only once + seekExact from then on" and "always seekExact". I mean, the first call of "next" and the first call of seekExact, they are different? If what next() does is to load a block of data an

Re: Under what circumtances, termsEnum's next(), or seekExact(), o seekCeli() is more efficient?

2014-03-05 Thread Michael McCandless
Hmm I see only one question? Sure, after pulling a new TermsEnum, you can use .seekExact to position it, instead of next, but you must have a term in mind to "target" when you call seekExact. seekExact ought to be faster than seekCeil, since it's not required to position the enum if the term was

Under what circumtances, termsEnum's next(), or seekExact(), o seekCeli() is more efficient?

2014-03-05 Thread hao yan
Hey, guys Two questions: 1. From our experiments, we find next() is very costly. In TermsEnum's javadoc, it said that TermsEnum is unpositioned when you first obtain it and you must successfully call next or one of seek* methods. From my experiments, I find that next() is costly. My question is