The IndexReader.terms() method gets a list of all the terms in an index.
You need to somehow limit this to the terms for your ZipCode field which I
don't know how to do. Luke has the ability to do this though so it is
certainly possible.
Regards
Paul I.
"Ramana Jelda"
<[EMAIL PROTECTED]
o-group.com> To
<java-user@lucene.apache.org>
30/03/2006 10:21 cc
Subject
Please respond to RE: Return all distinct values
[EMAIL PROTECTED]
apache.org
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, March 30, 2006 11:06 AM
> To: java-user@lucene.apache.org
> Subject: Return all distinct values
>
> Hello,
> I created small Lucene's application which stores lot of my
> users infomation, on of it is zipcode in numeric format eg.
> 50501, 63601 - zip codes are stored in Text fields so they
> are fully searchable what I want now to do is getting all
> unique zipcodes which was stored so far. Something like SQL:
> select distinct zipcode from ...
> Is it possible?
>
> Best regards,
> Adr
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]