Re: filtering by first letter

2007-02-26 Thread Chris Hostetter
: OK I'm not sure I understand your answer. I thought TermEnum gave you : all the terms in an index, not from a search result. : : Let me clarify what I need. I'm looking for a way to find out all the : values of the FIELD_FILTER_LETTER field for any given search. : : INDEX TIME: (done for each

Re: filtering by first letter

2007-02-25 Thread Erick Erickson
OK, I was thinking you were wondering how to get only the set of letters you wanted the user to be able to choose from You're right, the TermEnum/TermDocs tell you all of the terms in an index, not really useful for your problem as I understand it now How many documents do you have in y

Re: filtering by first letter

2007-02-25 Thread Paul Sundling (Webdaddy)
OK I'm not sure I understand your answer. I thought TermEnum gave you all the terms in an index, not from a search result. Let me clarify what I need. I'm looking for a way to find out all the values of the FIELD_FILTER_LETTER field for any given search. INDEX TIME: (done for each indexed

Re: filtering by first letter

2007-02-23 Thread Erick Erickson
See TermEnum (I don't think you need TermDocs for this). If you instantiate a TermEnum(new Term("firstletterfield", "")), it'll enumerate all the terms in your 'firstletter' field and you can just collect them and go... For that matter, and assuming that your names are UN_TOKENIZED, you could do

filtering by first letter

2007-02-23 Thread Paul Sundling (Webdaddy)
I have a requirement to support filtering search results by first letter. This is relatively simple by adding a field to each index that represents the first letter for that relevant index and then adding a filter to the search. The hard part is that I need to list all the letters you can fil