patch with tests that fixes the core bug ... ReturnFields is used by TVC to parse the "fl" and only real fields found in it are used ... which fixes the "* is not a field" bug and brings the functionality back on par with past releases if any globs, functions or transformers are used in fl.
But looking at the code i think there's a lot of room for improvement:
- no partial globs are supported in fl or tv.fl (ie: "fl=*_t"
- per field override options are ignored when all TV are returned for all fields (either because of "fl=*" or no fl/tv.fl
- code structure is wonky
...the last item seemingly a relic from when the code use to use the "TermVectorMapper" interface to walk the vectors the various fields, and used diff code paths depending on wether "all" fields were requested, or just specific ones.
I'm going to try and take a stab at refactoring this to only ever use "reader.getTermVectors(docId)" (combined with ReturnFields.wantField) .. but if i don't get to it, this patch should still be good to go for 4.0