Simply run a search with a single TermQuery using currentTerm
. You can get the ids from the results.
Better yet, bypass the WildcardTermEnum and run a wildcard search. Because there is limited support for wildcards at the start of the term, you may want to consider using a SpanWildcardQuery.