You could also just use TermEnum, something like

       TermEnum termEnum = this.reader.getIndexReader().terms(new
Term(field, ""));

       Term term = termEnum.term();

       while ((term != null) && term.field().equals(field)) {
           System.out.println(term.text());
           termEnum.next();
           term = termEnum.term();
       }


On 6/21/07, Martin Spamer <[EMAIL PROTECTED]> wrote:


I need to return all of the keys for a certain field, essentially
"fieldName:*".    This causes a ParseException / lexical error
Encountered: "*" (42), after : ""

I understand why this fails, WildCard prevent this to keep the results
manageble.  In my case the number of results will always be managable.
the field contents is a closed set of values from a DB lookup table.

Luke can list the top keys via it's Overview tab, so this must be
possible.  I just can't figure out how.

I've tried googling but I'm just getting general stuff on wildcards, I
can't find the correct search terms to use.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to