From dev-return-317156-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Sat Mar 31 11:53:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id DABB018064A for ; Sat, 31 Mar 2018 11:53:04 +0200 (CEST) Received: (qmail 9927 invoked by uid 500); 31 Mar 2018 09:53:03 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 9917 invoked by uid 99); 31 Mar 2018 09:53:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 31 Mar 2018 09:53:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id EA608C11E0 for ; Sat, 31 Mar 2018 09:53:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id CiXOHDpUSZK6 for ; Sat, 31 Mar 2018 09:53:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 389C45F1B4 for ; Sat, 31 Mar 2018 09:53:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 89492E021B for ; Sat, 31 Mar 2018 09:53:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 31B3F255FD for ; Sat, 31 Mar 2018 09:53:00 +0000 (UTC) Date: Sat, 31 Mar 2018 09:53:00 +0000 (UTC) From: "Mikhail Khludnev (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SOLR-6700) ChildDocTransformer doesn't return correct children after updating and optimising solr index MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SOLR-6700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16421262#comment-16421262 ] Mikhail Khludnev commented on SOLR-6700: ---------------------------------------- bq. If possible it would be great to throw an error when attempting to update part of a block. But that would probably mean storing more metadata in the index and doing an extra query up front for every add...? [~janhoy], as it was discussed at Vegas, it make sense to create a subclass of {{DUH2}} which always adds \_root_ field even if a doc is a childfree. It's considered as affordable tradeoff to make the scenarios like this (atomic update of parent's field) much easier to implement. > ChildDocTransformer doesn't return correct children after updating and optimising solr index > -------------------------------------------------------------------------------------------- > > Key: SOLR-6700 > URL: https://issues.apache.org/jira/browse/SOLR-6700 > Project: Solr > Issue Type: Bug > Components: update > Reporter: Bogdan Marinescu > Priority: Critical > Fix For: 4.10.5 > > > I have an index with nested documents. > {code:title=schema.xml snippet|borderStyle=solid} > > > > > > > > {code} > Afterwards I add the following documents: > {code} > > > 1 > Test Artist 1 > 1 > > 11 > Test Album 1 > Test Song 1 > 2 > > > > 2 > Test Artist 2 > 1 > > 22 > Test Album 2 > Test Song 2 > 2 > > > > {code} > After performing the following query > {quote} > http://localhost:8983/solr/collection1/select?q=%7B!parent+which%3DentityType%3A1%7D&fl=*%2Cscore%2C%5Bchild+parentFilter%3DentityType%3A1%5D&wt=json&indent=true > {quote} > I get a correct answer (child matches parent, check _root_ field) > {code:title=add docs|borderStyle=solid} > { > "responseHeader":{ > "status":0, > "QTime":1, > "params":{ > "fl":"*,score,[child parentFilter=entityType:1]", > "indent":"true", > "q":"{!parent which=entityType:1}", > "wt":"json"}}, > "response":{"numFound":2,"start":0,"maxScore":1.0,"docs":[ > { > "id":"1", > "pName":"Test Artist 1", > "entityType":1, > "_version_":1483832661048819712, > "_root_":"1", > "score":1.0, > "_childDocuments_":[ > { > "id":"11", > "cAlbum":"Test Album 1", > "cSong":"Test Song 1", > "entityType":2, > "_root_":"1"}]}, > { > "id":"2", > "pName":"Test Artist 2", > "entityType":1, > "_version_":1483832661050916864, > "_root_":"2", > "score":1.0, > "_childDocuments_":[ > { > "id":"22", > "cAlbum":"Test Album 2", > "cSong":"Test Song 2", > "entityType":2, > "_root_":"2"}]}] > }} > {code} > Afterwards I try to update one document: > {code:title=update doc|borderStyle=solid} > > > 1 > INIT > > > {code} > After performing the previous query I get the right result (like the previous one but with the pName field updated). > The problem only comes after performing an *optimize*. > Now, the same query yields the following result: > {code} > { > "responseHeader":{ > "status":0, > "QTime":1, > "params":{ > "fl":"*,score,[child parentFilter=entityType:1]", > "indent":"true", > "q":"{!parent which=entityType:1}", > "wt":"json"}}, > "response":{"numFound":2,"start":0,"maxScore":1.0,"docs":[ > { > "id":"2", > "pName":"Test Artist 2", > "entityType":1, > "_version_":1483832661050916864, > "_root_":"2", > "score":1.0, > "_childDocuments_":[ > { > "id":"11", > "cAlbum":"Test Album 1", > "cSong":"Test Song 1", > "entityType":2, > "_root_":"1"}, > { > "id":"22", > "cAlbum":"Test Album 2", > "cSong":"Test Song 2", > "entityType":2, > "_root_":"2"}]}, > { > "id":"1", > "pName":"INIT", > "entityType":1, > "_root_":"1", > "_version_":1483832916867809280, > "score":1.0}] > }} > {code} > As can be seen, the document with id:2 now contains the child with id:11 that belongs to the document with id:1. > I haven't found any references on the web about this except http://blog.griddynamics.com/2013/09/solr-block-join-support.html > Similar issue: SOLR-6096 > Is this problem known? Is there a workaround for this? -- 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