Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 19CF2200BF4 for ; Fri, 6 Jan 2017 22:13:38 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 186D7160B39; Fri, 6 Jan 2017 21:13:38 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3ADF9160B37 for ; Fri, 6 Jan 2017 22:13:37 +0100 (CET) Received: (qmail 10094 invoked by uid 500); 6 Jan 2017 21:13:35 -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 10083 invoked by uid 99); 6 Jan 2017 21:13:35 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jan 2017 21:13:35 +0000 Received: from mail-it0-f46.google.com (mail-it0-f46.google.com [209.85.214.46]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 41AE61A02F0 for ; Fri, 6 Jan 2017 21:13:35 +0000 (UTC) Received: by mail-it0-f46.google.com with SMTP id 192so21020629itl.1 for ; Fri, 06 Jan 2017 13:13:35 -0800 (PST) X-Gm-Message-State: AIkVDXLNwgeayEvIQ65jrq8BexN+VTsF6Mdwx8ASNMogkgUfFc+w6mgrw7aU85C3hs01ngnnkyPc7pgEcfkeTg== X-Received: by 10.36.91.85 with SMTP id g82mr586738itb.23.1483737214578; Fri, 06 Jan 2017 13:13:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.211.166 with HTTP; Fri, 6 Jan 2017 13:13:34 -0800 (PST) In-Reply-To: References: From: Mikhail Khludnev Date: Sat, 7 Jan 2017 00:13:34 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Subqueries To: solr-user Content-Type: multipart/alternative; boundary=001a1144c4749d94f50545737d8f archived-at: Fri, 06 Jan 2017 21:13:38 -0000 --001a1144c4749d94f50545737d8f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Denormalising works on small numbers, but it hits ceil quite soon, because it scales hard. People did such snippet enrichment in apps for ages. There is nothing special in it. Probably someone can port it to 4.10 as a plugin. On Sat, Jan 7, 2017 at 12:08 AM, Peter Matthew Eichman wrote: > Thanks, we will look into the feasibility of a Solr upgrade. If not, is > there anything in 4.10 that would allow us to do something similar, or > would we be stuck with denormalizing our data at index time? > > -Peter > > On Fri, Jan 6, 2017 at 4:03 PM, Mikhail Khludnev wrote: > > > https://issues.apache.org/jira/browse/SOLR-8208 is resolved for 6.1. > > I don't know why 4.10 didn't throw exception on referring to [subquery]= , > > which is absent there. > > > > On Fri, Jan 6, 2017 at 6:23 PM, Peter Matthew Eichman > > wrote: > > > > > Hi Mikhail, > > > > > > I've turned on DEBUG level logging, but I still only see the main > request > > > logged, and no requests for the subqueries. > > > > > > Could it be a version issue? We are running Solr 4.10. > > > > > > Thanks, > > > -Peter > > > > > > On Fri, Jan 6, 2017 at 1:56 AM, Mikhail Khludnev > > wrote: > > > > > > > Peter, > > > > Subquery should also log its' request. Can't you find it in log? > > > > > > > > On Fri, Jan 6, 2017 at 1:19 AM, Peter Matthew Eichman < > > peichman@umd.edu> > > > > wrote: > > > > > > > > > Hello Mikhail, > > > > > > > > > > I put pcdm_members into the fl, and it is definitely stored. I > tried > > > > adding > > > > > the logParamsList, but all I see in the log is > > > > > 183866104 [qtp1778535015-14] INFO org.apache.solr.core.SolrCore = =E2=80=93 > > > > > [fedora4] webapp=3D/solr path=3D/select params=3D{q=3Did:"https:/= / > > > > > fcrepolocal/fcrepo/rest/pcdm/19/31/3c/1a/19313c1a-6ab4- > > > > > 4305-93ec-12dfdf01ba74"&members.logParamsList=3Dq,fl, > > > > > rows,row.pcdm_members&indent=3Dtrue&fl=3Dmembers:[subquery]& > > > > > members.fl=3Did,title&members.q=3D{!terms+f%3Did+v%3D$row.pcdm_ > > > > > members}&wt=3Djson&_=3D1483654385162} hits=3D1 status=3D0 QTime= =3D0 > > > > > > > > > > Still getting no members key in the output: > > > > > > > > > > { > > > > > "responseHeader": { > > > > > "status": 0, > > > > > "QTime": 1, > > > > > "params": { > > > > > "q": "id:\"https://fcrepolocal/fcrepo/rest/pcdm/19/31/3c/1a= / > > > > > 19313c1a-6ab4-4305-93ec-12dfdf01ba74\"", > > > > > "members.logParamsList": "q,fl,rows,row.pcdm_members", > > > > > "indent": "true", > > > > > "fl": "pcdm_members,members:[subquery]", > > > > > "members.fl": "id,title", > > > > > "members.q": "{!terms f=3Did v=3D$row.pcdm_members}", > > > > > "wt": "json", > > > > > "_": "1483654538166" > > > > > } > > > > > }, > > > > > "response": { > > > > > "numFound": 1, > > > > > "start": 0, > > > > > "docs": [ > > > > > { > > > > > "pcdm_members": [ > > > > > "https://fcrepolocal/fcrepo/rest/pcdm/28/2e/5b/f5/ > > > > > 282e5bf5-74c8-4148-9c1a-4ebead6435cb", > > > > > "https://fcrepolocal/fcrepo/rest/pcdm/6e/7c/36/2f/ > > > > > 6e7c362f-d239-4534-abd7-28caa24a134c", > > > > > "https://fcrepolocal/fcrepo/rest/pcdm/6e/e3/a6/33/ > > > > > 6ee3a633-998e-4f36-b80f-d76bcbe0d352", > > > > > "https://fcrepolocal/fcrepo/rest/pcdm/8a/d9/c7/62/ > > > > > 8ad9c762-4391-428d-b1ad-be5ac3e06c42" > > > > > ] > > > > > } > > > > > ] > > > > > } > > > > > } > > > > > > > > > > Is $row.pcdm_members the right way to refer to the pcdm_members > field > > > > > of the current document in the subquery? Is the multivalued natur= e > of > > > > > the field a problem? I have tried adding separator=3D' ' to both = the > > > > > [subquery] and {!terms}, but to no avail. > > > > > > > > > > Thanks, > > > > > -Peter > > > > > > > > > > On Thu, Jan 5, 2017 at 4:38 PM, Mikhail Khludnev > > > > wrote: > > > > > > > > > > > Hello, > > > > > > > > > > > > Can you add pcdm_members into fl to make sure it's stored? > > > > > > Also please add the following param > > > > > > members.logParamsList=3Dq,fl,rows,row.pcdm_members, > > > > > > and check logs then. > > > > > > > > > > > > On Thu, Jan 5, 2017 at 9:46 PM, Peter Matthew Eichman < > > > > peichman@umd.edu> > > > > > > wrote: > > > > > > > > > > > > > Hello all, > > > > > > > > > > > > > > I am attempting to use a subquery to enrich a query with the > > titles > > > > of > > > > > > > related objects. Each document in my index may have 1 or more > > > > > > pcdm_members > > > > > > > and pcdm_related_objects fields, whose values are ids of othe= r > > > > > documents > > > > > > in > > > > > > > the index. Those documents in turn have reciprocal > pcdm_member_of > > > and > > > > > > > pcdm_related_object_of fields. > > > > > > > > > > > > > > In the Blacklight app I am working on, we want to enrich the > > > display > > > > > of a > > > > > > > document with the titles of its members and related objects > > using a > > > > > > > subquery. However, this is out first foray into subqueries an= d > > > things > > > > > > > aren't working as expected. > > > > > > > > > > > > > > I expected the following query to return a "members" key with= a > > > > > document > > > > > > > list of documents with "id" and "title" keys, but I am gettin= g > > > > nothing: > > > > > > > > > > > > > > { > > > > > > > "responseHeader": { > > > > > > > "status": 0, > > > > > > > "QTime": 1, > > > > > > > "params": { > > > > > > > "q": "id:\"https://fcrepolocal/ > > fcrepo/rest/pcdm/19/31/3c/1a/ > > > > > > > 19313c1a-6ab4-4305-93ec-12dfdf01ba74\"", > > > > > > > "indent": "true", > > > > > > > "fl": "members:[subquery]", > > > > > > > "members.fl": "id,title", > > > > > > > "members.q": "{!terms f=3Did v=3D$row.pcdm_members}", > > > > > > > "wt": "json", > > > > > > > "_": "1483641932207" > > > > > > > } > > > > > > > }, > > > > > > > "response": { > > > > > > > "numFound": 1, > > > > > > > "start": 0, > > > > > > > "docs": [ > > > > > > > {} > > > > > > > ] > > > > > > > } > > > > > > > } > > > > > > > > > > > > > > Any pointers on what I am missing? Are there any configuratio= n > > > > settings > > > > > > in > > > > > > > solrconfig.xml that I need to be aware of for subqueries to > work? > > > > > > > > > > > > > > Thanks, > > > > > > > -Peter > > > > > > > > > > > > > > -- > > > > > > > Peter Eichman > > > > > > > Senior Software Developer > > > > > > > University of Maryland Libraries > > > > > > > peichman@umd.edu > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > Sincerely yours > > > > > > Mikhail Khludnev > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Peter Eichman > > > > > Senior Software Developer > > > > > University of Maryland Libraries > > > > > peichman@umd.edu > > > > > > > > > > > > > > > > > > > > > -- > > > > Sincerely yours > > > > Mikhail Khludnev > > > > > > > > > > > > > > > > -- > > > Peter Eichman > > > Senior Software Developer > > > University of Maryland Libraries > > > peichman@umd.edu > > > > > > > > > > > -- > > Sincerely yours > > Mikhail Khludnev > > > > > > -- > Peter Eichman > Senior Software Developer > University of Maryland Libraries > peichman@umd.edu > --=20 Sincerely yours Mikhail Khludnev --001a1144c4749d94f50545737d8f--