Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6310118E5D for ; Mon, 30 Nov 2015 18:06:15 +0000 (UTC) Received: (qmail 38687 invoked by uid 500); 30 Nov 2015 18:06:11 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 38629 invoked by uid 500); 30 Nov 2015 18:06:11 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 37809 invoked by uid 99); 30 Nov 2015 18:06:10 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Nov 2015 18:06:10 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 24B1DC05AC for ; Mon, 30 Nov 2015 18:06:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.901 X-Spam-Level: ** X-Spam-Status: No, score=2.901 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, WEIRD_PORT=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=griddynamics.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id A_Kk0wJ6h544 for ; Mon, 30 Nov 2015 18:06:02 +0000 (UTC) Received: from mail-lf0-f45.google.com (mail-lf0-f45.google.com [209.85.215.45]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id E7B7C42ABE for ; Mon, 30 Nov 2015 18:06:01 +0000 (UTC) Received: by lfs39 with SMTP id 39so203001471lfs.3 for ; Mon, 30 Nov 2015 10:06:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=griddynamics.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=Bz4sNw0CB6bX69s+qGm2yEoy7KdXTy8MGb+K7Tk3Ymc=; b=JXhyeugxedLPvg0TfhRCXD+3cUorIVtsOdLldYMOGJgmRKrCeR1sAw9mM7yGvhUKfe ofjGNmrh7iVadyAFC1Q+3vefCxAX8IFaNsuMidoYgeTy0IWlVa2vGRF5XOXJpg/i9rR+ 15ZhOsbLGSzWfayGUOYe0EBxAXV8Y+v+GZ5xU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=Bz4sNw0CB6bX69s+qGm2yEoy7KdXTy8MGb+K7Tk3Ymc=; b=afTWPoqthbkr5ndksyVC6tO7xiMD2uwenjTl8J6vO2Rm6N9Z6wDMfgQbBIwKx+u494 ndqA09bp0yo0mC3YT3CkCNzvttKrIqGnu/nEmJDSAW7fpDbyQEA1Q/sek//Pya6HIc3v 8sdCyNZeG+rbA0tVMzC2RNHu9S9Y7p2RfTE+F5R4SnYlATyNZO2CeZxTVXp4x1IUVea/ +rK4Fy0ZOcmMGZF9agDE5EYYOJzj+BsdGbQUrDjCsAEXH78aGbxUuD8u2iXav56PcW0/ KGOqE35DQq10ui0/541bRM5kH5HketwfXK1OwQ/F0dM+znJb1Gp50GU1aIl/zTPFgENJ n8IA== X-Gm-Message-State: ALoCoQkzq3EN3dICBB+hvaIPSZK0PiJ16MlwKLsJgmKs2WdpV0eXBtRPufEouu6wENokX4I+rh6A X-Received: by 10.112.235.65 with SMTP id uk1mr26380329lbc.118.1448906759951; Mon, 30 Nov 2015 10:05:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.114.185.103 with HTTP; Mon, 30 Nov 2015 10:05:20 -0800 (PST) In-Reply-To: References: From: Mikhail Khludnev Date: Mon, 30 Nov 2015 21:05:20 +0300 Message-ID: Subject: Re: Block Joins To: solr-user Content-Type: multipart/alternative; boundary=001a11c310bebd6da30525c5e4bb --001a11c310bebd6da30525c5e4bb Content-Type: text/plain; charset=UTF-8 Rick, I'd happy that it helps. You need to thank Varun who made [child]. There is no performance impact for sure, it's a compromise or either nobody considered it as an issue. You can raise a new JIRA and describe how it should work in general and make everybody happy. On top of my head are SOLR-8208 and SOLR-7672 which may interfere with it. So, report your vision. On Mon, Nov 30, 2015 at 7:01 PM, Rick Leir wrote: > @Mikhail++ Yes! And the query below works. As Mark Bennett notes, "seems > odd to need to specify filters again". Is there a performance impact, > perhaps accessing the index twice? > > curl http://localhost:8983/solr/dorsetdata/query -d 'q={! > parent which="content_type:parentDocument"} type_s:page AND charlie& > wt=json&indent=true& > fl=score,[child parentFilter=type_s:book childFilter="charlie" > ],canonicalMaster,title,publisher,[docid]' > > Cheers -- Rick > > Re: Block Joins > > 118348 by: Rick Leir > > 118349 by: Mikhail Khludnev > > > > > > Subject: Re: Block Joins > > Hello Rick, > > > If I got you right, it's worth to have a look at [child] > > > > https://cwiki.apache.org/confluence/display/solr/Transforming+Result+Documents > < > https://cwiki.apache.org/confluence/display/solr/Transforming+Result+Documents > > > > Let me know if it works. > > On Sun, Nov 29, 2015 at 5:47 PM, Rick Leir > wrote: > > > Hi all, > > I am new to Block Joins, and am trying to follow > > > > > > https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-BlockJoinQueryParsers > > > > This page shows two forms of block join > > > > syntax for this parser q={!child of=}. > > example query q={!child > > of="content_type:parentDocument"}title:lucene > > return output is the children. > > > > syntax for this parser q={!parent which=} > > example query q={!parent > > which="content_type:parentDocument"}comments:SolrCloud > > return output is their parents. > > > > > > Is it possible to get a list of the matching children, along with the > > parent record? I have tried > > > > > > $ curl http://localhost:8983/solr/dorsetdata/query -d ' > > q={!parent which="content_type:parentDocument"} type_s:page AND civilian& > > wt=json&indent=true&fl=score,*,[docid]' > > > > This gives me just the parent record's fields. > > > > $ curl http://localhost:8983/solr/dorsetdata/query -d ' > > q={!child of="content_type:parentDocument"}& > > wt=json&indent=true&fl=score,*,[docid]' > > > > This gives me a list of parent records. > > > > $ curl http://localhost:8983/solr/dorsetdata/query -d ' > > q={!child of="content_type:parentDocument"} type_s:book AND > > publication_type:journal& > > wt=json&indent=true&fl=score,*,[docid]' > > > > This gives me the child records but no info from the parent record. > > > > > But what I need is fields from the matching children, along with fields > > from the parent record. > > TIA -- Rick > > > -- Sincerely yours Mikhail Khludnev Principal Engineer, Grid Dynamics --001a11c310bebd6da30525c5e4bb--