Github user shalinmangar commented on a diff in the pull request:
https://github.com/apache/lucene-solr/pull/47#discussion_r69419263
--- Diff:
solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java ---
@@ -910,8 +910,12 @@ protected void createMainQuery(ResponseBuilder rb) {
additionalAdded = addFL(additionalFL, "score", additionalAdded);
}
} else {
- // reset so that only unique key is requested in shard requests
- sreq.params.set(CommonParams.FL,
rb.req.getSchema().getUniqueKeyField().getName());
+ if (rb.req.getSearcher().enableLazyFieldLoading) {
+ // reset so that only unique key is requested in shard requests
+ sreq.params.set(CommonParams.FL,
rb.req.getSchema().getUniqueKeyField().getName());
+ } else {
+ sreq.params.set(CommonParams.FL, "*");
--- End diff --
Thanks for investigating and the detailed note.
I don't think DistribJoinFromCollectionTest or TestCloudDeleteByQuery are
doing anything wrong. The difference, as you said, is that your patch changes
`doc()` to actually respect the fields list and when lazy loading is disabled,
proceeds to cache an _incomplete_ document returned by Lucene. So this patch
changes Solr from always caching either complete documents (when lazy loading
is disabled) or lazy documents (when lazy loading is enabled) to caching
potentially incomplete documents which have no idea about the other
(non-requested) fields. So if we want to go back to the old behavior then
option 'a' is the way to go when lazy loading is disabled.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]