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 and position to the beginning of th block and seekExact() is to load a block and position to the target, then next() should be more efficient, right?
2. Is multiFields/multiTerms/multiTermsEnum efficient ? We have a fixed number ( three) segments always. We want to search on the three segments for each query. Therefore we borrowed most of the code of multixxx. Is there anyway to optimize this? Please advise. thanks! hao On Wed, Mar 5, 2014 at 10:21 AM, Michael McCandless < [email protected]> wrote: > 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 not found. > > But next() ought to be faster than seekExact; you're seeing the opposite? > > Mike McCandless > > http://blog.mikemccandless.com > > > On Wed, Mar 5, 2014 at 12:47 PM, hao yan <[email protected]> wrote: > > 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: > > > > Can we only use seekExact() and never use seekCeil or next , in order to > > improve performance ? > > > > thanks! > > > > hao > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
