Hey, Michael thanks!
it is close to what I think. hao On Fri, Mar 7, 2014 at 9:55 AM, Michael McCandless < [email protected]> wrote: > On Wed, Mar 5, 2014 at 4:34 PM, hao yan <[email protected]> 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 > > 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? > > The first next() call is not that different from seekExact: it must > load the block containing the first term and read bytes from it. > > After that, next() should be cheaper than seekExact. > > > 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? > > They are relatively efficient? I mean, they must merge-sort the > terms, and manage N segments that might have a term under the hood, > but it's the best we can do (unless you can forceMerge). > > But it's better to operate per-segment if you care about performance. > > Mike McCandless > > http://blog.mikemccandless.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
