mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
This commit reuses the automaton that defines the allowed fields in `FieldSubsetReader` rather than resolving the list of all matching fields from the mapping. As a side-effect this change solves a bug that unmapped fields could previously not be read from the source. Moreover it avoids determinization errors in the case that the number of matching fields is high. It also uses `CharacterRunAutomaton` to evaluate automata against a given string, which should be faster than naively stepping into the automaton since `CharacterRunAutomaton` builds a lookup table of transitions. Closes elastic/elasticsearch#4679 Original commit: elastic/x-pack-elasticsearch@a30913dbd5