On Fri, Aug 7, 2015 at 8:30 AM, Trejkaz <[email protected]> wrote:
>     for (int ourId = 0; ourId < count; ourId++)
>     {
>         builder.clear();
>         NumericUtils.longToPrefixCoded(ourId, 0, builder);
>         termsEnum.seekExact(builder.get());
>         postingsEnum = termsEnum.postings(null, postingsEnum);
>         int docId = postingsEnum.nextDoc(); // only ever one value
>     }

Does your application actually iterate in order over dense ids, or is
it just for benchmarking purposes? Because if it does, you probably
don't actually need seeking, you could just see what the current ID in
the terms enum is. If you actually need seeking, then you should try
to avoid MultiFields, it will call seedExact on each segment, while
given what I see you could just stop after you found one segment with
the value.

-- 
Adrien

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to