You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Lucene/Solr QA (JIRA)" <ji...@apache.org> on 2019/04/04 19:12:00 UTC

[jira] [Commented] (SOLR-12167) Child documents are ignored if unknown atomic operation specified in parent doc

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

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

| (/) *{color:green}+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}  1m 36s{color} | {color:green} master passed {color} |
|| || || || {color:brown} Patch Compile Tests {color} ||
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  1m 26s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  1m 26s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} Release audit (RAT) {color} | {color:green}  1m 26s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} Check forbidden APIs {color} | {color:green}  1m 26s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} Validate source patterns {color} | {color:green}  1m 26s{color} | {color:green} the patch passed {color} |
|| || || || {color:brown} Other Tests {color} ||
| {color:green}+1{color} | {color:green} unit {color} | {color:green} 43m 45s{color} | {color:green} core in the patch passed. {color} |
| {color:black}{color} | {color:black} {color} | {color:black} 49m 18s{color} | {color:black} {color} |
\\
\\
|| 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 4.4.0-137-generic #163~14.04.1-Ubuntu SMP Mon Sep 24 17:14:57 UTC 2018 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 / 1ec229b |
| ant | version: Apache Ant(TM) version 1.9.3 compiled on July 24 2018 |
| Default Java | 1.8.0_191 |
|  Test Results | https://builds.apache.org/job/PreCommit-SOLR-Build/366/testReport/ |
| modules | C: solr/core U: solr/core |
| Console output | https://builds.apache.org/job/PreCommit-SOLR-Build/366/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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org