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

Lucene/Solr QA commented on SOLR-12167:
---------------------------------------

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
|| || || || {color:brown} Prechecks {color} ||
| {color:green}+1{color} | {color:green} test4tests {color} | {color:green}  0m 
 0s{color} | {color:green} The patch appears to include 1 new or modified test 
files. {color} |
|| || || || {color:brown} master Compile Tests {color} ||
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
51s{color} | {color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  0m 
51s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  0m 
51s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} Release audit (RAT) {color} | 
{color:green}  0m 51s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} Check forbidden APIs {color} | 
{color:green}  0m 51s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} Validate source patterns {color} | 
{color:green}  0m 51s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:red}-1{color} | {color:red} unit {color} | {color:red} 51m 22s{color} 
| {color:red} core in the patch failed. {color} |
| {color:black}{color} | {color:black} {color} | {color:black} 54m 49s{color} | 
{color:black} {color} |
\\
\\
|| Reason || Tests ||
| Failed junit tests | solr.cloud.TestLeaderElectionZkExpiry |
|   | solr.cloud.cdcr.CdcrBidirectionalTest |
\\
\\
|| Subsystem || Report/Notes ||
| JIRA Issue | SOLR-12167 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12917198/SOLR-12167.patch |
| Optional Tests |  compile  javac  unit  ratsources  checkforbiddenapis  
validatesourcepatterns  |
| uname | Linux lucene1-us-west 3.13.0-88-generic #135-Ubuntu SMP Wed Jun 8 
21:10:42 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | ant |
| Personality | 
/home/jenkins/jenkins-slave/workspace/PreCommit-SOLR-Build/sourcedir/dev-tools/test-patch/lucene-solr-yetus-personality.sh
 |
| git revision | master / 2c1f110 |
| ant | version: Apache Ant(TM) version 1.9.3 compiled on April 8 2014 |
| Default Java | 1.8.0_152 |
| unit | 
https://builds.apache.org/job/PreCommit-SOLR-Build/34/artifact/out/patch-unit-solr_core.txt
 |
|  Test Results | 
https://builds.apache.org/job/PreCommit-SOLR-Build/34/testReport/ |
| modules | C: solr/core U: solr/core |
| Console output | 
https://builds.apache.org/job/PreCommit-SOLR-Build/34/console |
| Powered by | Apache Yetus 0.7.0   http://yetus.apache.org |


This message was automatically generated.



> Child documents are ignored if unknown atomic operation specified in parent 
> doc
> -------------------------------------------------------------------------------
>
>                 Key: SOLR-12167
>                 URL: https://issues.apache.org/jira/browse/SOLR-12167
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: update
>            Reporter: Munendra S N
>            Priority: Major
>         Attachments: SOLR-12167.patch
>
>
> On trying to add this nested document,
> {code:java}
> {uniqueId : book6, type_s:book, title_t : "The Way of Kings", author_s : 
> "Brandon Sanderson",
>   cat_s:fantasy, pubyear_i:2010, publisher_s:Tor, parent_unbxd:true,
>   _childDocuments_ : [
>     { uniqueId: book6_c1, type_s:review, 
> review_dt:"2015-01-03T14:30:00Z",parentId : book6,
>       stars_i:5, author_s:rahul,
>       comment_t:"A great start to what looks like an epic series!"
>     }
>     ,
>     { uniqueId: book6_c2, type_s:review, 
> review_dt:"2014-03-15T12:00:00Z",parentId : book6,
>       stars_i:3, author_s:arpan,
>       comment_t:"This book was too long."
>     }
>   ],labelinfo:{label_image:"",hotdeal_type:"",apply_hotdeal:""}
>  }
> {code}
> Only parent document is getting indexed(without labelinfo field) and child 
> documents are being ingored.
> On checking the code,
> https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/update/processor/AtomicUpdateDocumentMerger.java#L94
>  
> I realized that since *labelinfo* is a Map, Solr is trying for atomic updates 
> and since label_image, hotdeal_type, apply_hotdeal are invalid operation 
> field is ignored. Unfortunately, child documents are also not getting indexed.
> h4. Problem with current behavior:
> * field is silently ignored when its value is a map instead of failing 
> document update(when present in parent)
> * In the above case, child document is also getting ignored
> * If any field value is Map in child document but not in parent then nested 
> document is indexed properly
> {code:java}
> {uniqueId : book6, type_s:book, title_t : "The Way of Kings", author_s : 
> "Brandon Sanderson",
>   cat_s:fantasy, pubyear_i:2010, publisher_s:Tor, parent_unbxd:true,
>   _childDocuments_ : [
>     { uniqueId: book6_c1, type_s:review, 
> review_dt:"2015-01-03T14:30:00Z",parentId : book6,
>       stars_i:5, author_s:rahul,
>       comment_t:"A great start to what looks like an epic series!"
> ,labelinfo:{label_image:"","hotdeal_type":"","apply_hotdeal":""}
>     }
>     ,
>     { uniqueId: book6_c2, type_s:review, 
> review_dt:"2014-03-15T12:00:00Z",parentId : book6,
>       stars_i:3, author_s:arpan,
>       comment_t:"This book was too long."
>     }
>   ]
>  }
> {code}
> Here, nested document is indexed and labelinfo field value indexed in 
> book6_c1 as string(using Map.toString())
> h4. Probable solution
> * If an unknown operation is specified in update document then instead of 
> ignoring the field and field value, fail the document update(fail fast 
> approach). So, that user would know something is wrong with the document. 
> Also, this would solve the case where the parent doc is getting indexed and 
> child documents are getting ignored
> * Currently, when child document's field value is a Map even then it gets 
> indexed, instead update should fail



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

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

Reply via email to