Yeah, but I haven't used the termfreq thingy enough to think of it automatically <G>...
Besides, I'm learning that if I put a fooliwh answer out there, someone'll correct me. Thanks Erick On 10/23/06, Paul Elschot <[EMAIL PROTECTED]> wrote:
On Monday 23 October 2006 21:16, Erick Erickson wrote: > Use TermDocs.seek(Term) to get to the term. That'll position your TermDocs > variable at a list, ordered by document ID of the ocurrences of a term. Then > TermDocs.skipTo(doc ID) will get you to the list of terms for that document > (you have to know what Lucene DocId you care about here.). > > Now TermDocs.next() will increment through and you can count. Something > like. > > TermDocs td = IndexReader.termDocs(); > td.seek(new Term("field", "value")); > td.skipto(docId); and then td.freq() should give the answer without counting. Regards, Paul Elschot --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]