[
https://issues.apache.org/jira/browse/SOLR-5285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Varun Thacker updated SOLR-5285:
--------------------------------
Attachment: SOLR-5285.patch
1. After having a quick glance at the code I don't think it's trivial to add
return fields for child docs. I could create a follow up Jira for it. But I
added more tests to verify the the top level fl param does not affect the
fields coming back in the child document.
2. Moved TextResponseWriter.toSolrDocument to ResponseWriterUtil.toSolrDocument
3. I tested with adding grandchildren document, and the behaviour is that the
grandchildren docs gets returned along with the child docs by
ToChildBlockJoinQuery. I'll go through ToChildBlockJoinQuery to see if thats
the expected behaviour.
4. Updated JavaBinCodec to handle child documents. Added a test
TestChildDocTransformer.testJavaBinCodec. Also TestJavaBinCodec passes so it
should have any backward or forward compatibility issues.
5. Simplified TestChildDocTransformer.createIndex
6. Fixed ChildDocTransformer.transform to directly create ToChildBlockJoinQuery
7. Added null check in SolrDocument.clear()
> Solr response format should support child Docs
> ----------------------------------------------
>
> Key: SOLR-5285
> URL: https://issues.apache.org/jira/browse/SOLR-5285
> Project: Solr
> Issue Type: New Feature
> Reporter: Varun Thacker
> Fix For: 4.8
>
> Attachments: SOLR-5285.patch, SOLR-5285.patch, SOLR-5285.patch
>
>
> Solr has added support for taking childDocs as input ( only XML till now ).
> It's currently used for BlockJoinQuery.
> I feel that if a user indexes a document with child docs, even if he isn't
> using the BJQ features and is just searching which results in a hit on the
> parentDoc, it's childDocs should be returned in the response format.
> [[email protected]] on IRC suggested that the DocTransformers would
> be the place to add childDocs to the response.
> Now given a docId one needs to find out all the childDoc id's. A couple of
> approaches which I could think of are
> 1. Maintain the relation between a parentDoc and it's childDocs during
> indexing time in maybe a separate index?
> 2. Somehow emulate what happens in ToParentBlockJoinQuery.nextDoc() - Given a
> parentDoc it finds out all the childDocs but this requires a childScorer.
> Am I missing something obvious on how to find the relation between a
> parentDoc and it's childDocs because none of the above solutions for this
> look right.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]