We’ve hit an issue while developing marple, where we want to have the ability to filter the values from a SortedDocValues terms dictionary. Normally you’d create a CompiledAutomaton from the filter string, and then call #getTermsEnum(Terms) on it; but for docvalues, we don’t have a Terms instance, we instead have a TermsEnum.
Using AutomatonTermsEnum to wrap the TermsEnum works in most cases here, but if the CompiledAutomaton in question is a fixed string, then we get assertion failures, because ATE uses the compiled automaton’s internal ByteRunAutomaton for filtering, and fixed-string automata don’t have one. Is there a work-around that I’m missing here? Or should I maybe open a JIRA to add a #getTermsEnum(TermsEnum) method to CompiledAutomaton? Alan Woodward www.flax.co.uk
