There is one little note. If index has deletions then counters could
have wrong values...
mark harwood wrote:
This example code gets the unique terms for a field
and a total num docs for each...
String fieldName="myfield";
valueCounts=new ArrayList();
TermEnum termEnum;
termEnum = indexReader.
To
30/03/2006 10:21 cc
Subject
Please respond to
This example code gets the unique terms for a field
and a total num docs for each...
String fieldName="myfield";
valueCounts=new ArrayList();
TermEnum termEnum;
termEnum = indexReader.terms(new Term(fieldName,""));
Term term = termEnum.term();
while (term!=null)
{
if (!fieldName.equals(ter
Hi,
Actually lucene does not provide you a straight forward Query to get UNIQUE
results.
But as far as I know, u can use HitsCollector & BitSet combination to
count/get unique results.
Regards,
Jelda
> -Original Message-
> From: Java Programmer [mailto:[EMAIL PROTECTED]
> Sent: Thursday