: 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 person, stores the first letter of : their name as a field)
what you are describing is basically a faceted search problem (see list archive for copious discussion) step #1: get a list of all possible "first letters" (that's where a TermEnum comes into play ... iterate over all the terms for that ield) step #2: for each first letter, get the BitSet of documents corrisponding to that letter with a filter (this can be cached for hte life of your IndexReader and interest it with a BitSet from a Filter made from your users search critera ...there are other approaches to doing faceted searching that involve iterating over the results to get the list of possible values -- but i'm guessing the letters a name might start with is typically going ot be smaller then the set of results from a search ... so this approach is probably a safe bet. -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]