[ 
https://issues.apache.org/jira/browse/SOLR-7557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16663642#comment-16663642
 ] 

Jan Høydahl commented on SOLR-7557:
-----------------------------------

I don't have any more elegant solution than this. [~dsmiley] you may perhaps 
want to comment on this in light of the childDocs work you have been doing. 
Would there be a safer way to detect child docs than incrementing a level 
counter, and would this all change when allowing multiple children per master?

Thanks for the patience even since 2015! Your bumping of the issue on the 
mailing list caught my attention, thanks [~marvin.lillehaug].

The unit test is placed in `BasicHttpSolrClientTest`. The only other place I 
can find a test of the streaming binary writer is 
`SolrExampleTestsBase#testStreamingRequest`, but that is for testing streaming 
on request side. In lack of a separate BinaryResponseParserTest I guess it is 
as good location as any other.

 

> Solrj doesn't handle child documents when using queryAndStreamResponse
> ----------------------------------------------------------------------
>
>                 Key: SOLR-7557
>                 URL: https://issues.apache.org/jira/browse/SOLR-7557
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrJ
>    Affects Versions: 5.4
>            Reporter: Stian Østerhaug
>            Assignee: Jan Høydahl
>            Priority: Major
>             Fix For: 7.6, master (8.0)
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Getting the results from a query that as child documents results in "parsing 
> error" when using SolrClient's queryAndStreamResponse(), but not when using 
> the regular query() method.
> The bug is caused by StreamingBinaryResponseParser's JavaBinCodec override of 
> readSolrDocument which always returns null (the document is instead passed to 
> the callback), but JavaBinCodec uses the method to also decode child 
> documents.
> I have fixed this by using a simple nestedLevel variable that can be used to 
> detect if the document being parsed is a child (and should be returned) or a 
> parent (and should be passed to the callback).
> The fix feels kinda hacky, but it is simple. Link to a Github pull request to 
> follow.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to