dsmiley opened a new pull request, #5188: URL: https://github.com/apache/solr/pull/5188
Code that decides which index fields to load (`SolrDocumentFetcher`, `DocsStreamer`, `ExportWriter`) had to piece the answer together from `getLuceneFieldNames()`, `wantsField()` and `hasPatternMatching()`. That went wrong in a few cases, mostly when `fl` mixes globs with explicitly named fields, aliases or transformers. `ReturnFields` now answers those questions directly: - `wantsLuceneField(field)`: whether an index field's value is needed, either to return it or for a transformer. False for a name that belongs only to an alias or transformer, unless `*` was requested. - `isExplicitLuceneField(field)`: whether the field was named explicitly rather than only matched by a glob or `*`. `SolrReturnFields` now keeps its explicitly named fields when globs are present. `getLuceneFieldNames()` still returns null in that case, as before. **Effects:** - **Efficiency:** with globs, fields named only by an alias or transformer, and loaded fields nothing asked for, are no longer loaded or copied into the document. - **/select fix:** an explicitly named `useDocValuesAsStored=false` field next to a glob (e.g. `fl=val_*,_version_`) was silently dropped and is now returned. The ref guide says such fields "can still be explicitly requested by name in the fl param, but will not match glob patterns" (see SOLR-10437). - **/select fix:** a field a transformer reads (e.g. `[json f=…]`, `[geo f=…]`) wasn't loaded when `fl` also had a glob, and now is. - **/export fix:** a transformer or alias named like an index field (e.g. `body_t:[hl]`) no longer makes `/export` fetch that field, which failed when the field lacked docValues. - **/export behavior change:** an explicitly named field that can't be exported now errors even next to a glob or `*`, instead of being silently skipped. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
