I don't quite understand your question Jason... Seeking to the first term of the field just gets you the smallest term (in unsigned byte[] order, ie Unicode order if the byte[] is UTF8) across all docs.
Instead of docFreq, did you mean numUniqueTerms? Ie, you want to seek to the largest term for that field? In which case, yes seeking by term ord to numUniqueTerms-1 gets you to that term. But you have to use a terms index impl that supports ord (eg FixedGap). Mike On Fri, Feb 18, 2011 at 9:24 PM, Jason Rutherglen <jason.rutherg...@gmail.com> wrote: > This could be a rhetorical question. The way to find the last/max > term that is a unique per document is to use TermsEnum to seek to the > first term of a field, then call seek to the docFreq-1 for the last > ord, then get the term, or is there a better/faster way? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > > -- Mike http://blog.mikemccandless.com --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org