Re: Get all unique values of specific field

2007-05-30 Thread Erick Erickson
You could also think about pre-building a set of Filters once your index has been built, perhaps at warm-up time. One filter for each class and use those in your queries Erick On 5/30/07, karl wettin <[EMAIL PROTECTED]> wrote: 30 maj 2007 kl. 12.21 skrev Laxmilal Menaria: > On 5/30/07, k

Re: Get all unique values of specific field

2007-05-30 Thread karl wettin
30 maj 2007 kl. 12.21 skrev Laxmilal Menaria: On 5/30/07, karl wettin <[EMAIL PROTECTED]> wrote: 30 maj 2007 kl. 10.51 skrev Laxmilal Menaria: >> > What's the problem with a hit list iteration ( it should be >> > very fast ) ? > > Thats okay for short index, But if index have millions of rec

Re: Get all unique values of specific field

2007-05-30 Thread Jokin Cuadrado
You can also get stringindex of the class field, for access to the field info without the need of accessing the document in hits. You can implement a custom collector and get the unique values in that. On 5/30/07, karl wettin <[EMAIL PROTECTED]> wrote: 30 maj 2007 kl. 10.51 skrev Laxmilal Mena

Re: Get all unique values of specific field

2007-05-30 Thread Laxmilal Menaria
On 5/30/07, Laxmilal Menaria <[EMAIL PROTECTED]> wrote: Thanks karl, But if I implement faceted classification, then I know whats our classes name, but if I don't know classes name, then what should I do ? On 5/30/07, karl wettin <[EMAIL PROTECTED]> wrote: > > > 30 maj 2007 kl. 10.51 skrev La

Re: Get all unique values of specific field

2007-05-30 Thread Laxmilal Menaria
Thanks karl, But if I implement faceted classification, then I know whats our classes name, but if I don't know classes name, then what should I do ? On 5/30/07, karl wettin <[EMAIL PROTECTED]> wrote: 30 maj 2007 kl. 10.51 skrev Laxmilal Menaria: >> > What's the problem with a hit list itera

Re: Get all unique values of specific field

2007-05-30 Thread karl wettin
30 maj 2007 kl. 10.51 skrev Laxmilal Menaria: > What's the problem with a hit list iteration ( it should be > very fast ) ? Thats okay for short index, But if index have millions of records or GB's data then it will get slow . Iterate only the top n results when you gather the unique va

Re: Get all unique values of specific field

2007-05-30 Thread Laxmilal Menaria
tlist.Count; } cheers, Erich > -Original Message- > From: Michael Mitiaguin [mailto:[EMAIL PROTECTED] > Sent: Wednesday, May 30, 2007 9:33 AM > To: [EMAIL PROTECTED] > Subject: Re: Get all unique values of specific field > > Laxmilal , > > What's the problem wi

Re: Get all unique values of specific field

2007-05-30 Thread Mohammad Norouzi
I'm not sure if this is fulfill your needs: IndexReader.terms() which returns a TermEnum: TermEnum te = reader.terms(); while(te.next()) { if(te.term().field().equals("Class")) { System.out.println(te.term ().field()+":"+te.term().text());

Get all unique values of specific field

2007-05-30 Thread Laxmilal Menaria
Hello everyone, I have created a Lucene Index of Students Database, this database have 5 fields i.e. Name, Address, Class, PhoneNo and ScholarNo. Now I have opened Searcher and query "Name:Menaria" , Its return 100 results. Now I wants the All unique "Class" names which is return in Hits objects