[ 
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. Added JavaDocs to ChildDocTransformerFactory
2. Created a new binary file for backcompatibility and forwardcompatibility.

bq. Why is the tag name in the JSON format "childDocs" but in the XML format 
it's "childDoc" (no plural) ? ... seems like those should be consistent.

I guess because in JSON the input is a JSON array hence "childDocs", while in 
XML we use multiple "childDoc" tags to represent nested documents.

bq. the "10" hardcoded in the getDocList call is garunteed to burn someone ... 
it can definitely default to 10, but we need to have a local param for it in 
the tnrasformer

Added a non mandatory parameter called "numChildDocs" which makes it 
configurable. Although I'm not sure if the name is correct.

bq. Well, looking at your test, a more specific way to put it is that the new 
"child" transformer actually returns all descendents of the return documents in 
a flat list. Which is fine if we document it that way – but it has me thinking: 
we should really add a "childFilter" option to the transformer to constrain the 
results. This would not only help with the grand child situation, but would 
also make it easy for people to constrain the types of children they want to 
get back. (and getDocList can already take in a Query filter)

Added a non mandatory parameter called "childFilter" which could be used to 
filter out which child documents to be nested in the parent documents to be 
returned.

TODO - I will work on adding randomized testing

> 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.9, 5.0
>
>         Attachments: SOLR-5285.patch, SOLR-5285.patch, SOLR-5285.patch, 
> SOLR-5285.patch, 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]

Reply via email to