You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Varun Thacker (JIRA)" <ji...@apache.org> on 2014/05/22 08:10:38 UTC

[jira] [Comment Edited] (SOLR-5285) Solr response format should support child Docs

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

Varun Thacker edited comment on SOLR-5285 at 5/22/14 6:09 AM:
--------------------------------------------------------------

bq. testBackCompatForSolrDocumentWithChildDocs doesn't seem valid to me w/o changes to assertSolrDocumentEquals

Fixed assertSolrDocumentEquals. I had overlooked it. Thanks

bq. err msg typo in ChildDocTransformerFactory needs fixed
Fixed

bq. method sig change in XMLResponseParser.readDocument seems unneccesasary

Fixed. I was experimenting with some other way but with the current implementation the method signature doesn't need to be changed.

bq. better name for numChildDocs ? ... how about limit ?

+1 to limit. I never liked numChildDocs. Changed it to limit.

bq. why use <childDoc> in XML instead of <doc> ?

Agreed. We should use  <doc>. Even when a user inputs the nested documents in XML no special <childDoc> is used. Fixed XMLWriter and XMLResponseParser.

Also I changed the JSON ouput array key from {code}childDocs{code} to {code}_childDocuments_ {code} This keeps it consistent with the input JSON with child documents.


was (Author: varunthacker):
bq. testBackCompatForSolrDocumentWithChildDocs doesn't seem valid to me w/o changes to assertSolrDocumentEquals

Fixed assertSolrDocumentEquals. I had overlooked it. Thanks

bq. err msg typo in ChildDocTransformerFactory needs fixed
Fixed

bq. method sig change in XMLResponseParser.readDocument seems unneccesasary

Fixed. I was experimenting with some other way but with the current implementation the method signature doesn't need to be changed.

bq. better name for numChildDocs ? ... how about limit ?

+1 to limit. I never liked numChildDocs. Changed it to limit.

bq. why use <childDoc> in XML instead of <doc> ?

Agreed. We should use  <doc>. Even when a user inputs the nested documents in XML no special <childDoc> is used. Fixed XMLWriter and XMLResponseParser.

Also I changed the JSON ouput array key from childDocs to _childDocuments_ . This keeps it consistent with the input JSON with child documents.

> 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-5285.patch, SOLR-5285.patch, SOLR-5285.patch, SOLR-5285.patch, SOLR-5285.patch, SOLR-5285.patch, javabin_backcompat_child_docs.bin
>
>
> 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.
> [~hossman_lucene@fucit.org] 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org