Github user dsmiley commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/455#discussion_r224306158
  
    --- Diff: 
solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java 
---
    @@ -639,12 +650,30 @@ public static SolrInputDocument 
getInputDocument(SolrCore core, BytesRef idBytes
               sid = new SolrInputDocument();
             } else {
               Document luceneDocument = docFetcher.doc(docid);
    -          sid = toSolrInputDocument(luceneDocument, 
core.getLatestSchema());
    +          sid = toSolrInputDocument(luceneDocument, schema);
             }
    -        if (onlyTheseNonStoredDVs != null) {
    -          docFetcher.decorateDocValueFields(sid, docid, 
onlyTheseNonStoredDVs);
    -        } else {
    -          docFetcher.decorateDocValueFields(sid, docid, 
docFetcher.getNonStoredDVsWithoutCopyTargets());
    +        ensureDocDecorated(onlyTheseNonStoredDVs, sid, docid, docFetcher, 
resolveBlock || schema.hasExplicitField(IndexSchema.NEST_PATH_FIELD_NAME));
    +        SolrInputField rootField;
    +        if(resolveBlock && schema.isUsableForChildDocs() && (rootField = 
sid.getField(IndexSchema.ROOT_FIELD_NAME))!=null) {
    +          // doc is part of a nested structure
    +          ModifiableSolrParams params = new ModifiableSolrParams()
    +              .set("q", 
core.getLatestSchema().getUniqueKeyField().getName()+ ":" 
+rootField.getFirstValue())
    --- End diff --
    
    It seems the LocalSolrQueryRequest here is a dummy needed to satisfy some 
of the methods below.  This threw me; there should be comments and/or choice of 
var names (e.g. dummyReq) to reflect this.  "q" isn't needed; just the "fl".  
It seems we don't even need the "fl" here since that can be supplied as the 
first parameter to SolrReturnFields, which seems better if it works.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to