lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Matthew Eichman <peich...@umd.edu>
Subject Re: Subqueries
Date Fri, 06 Jan 2017 15:23:38 GMT
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 <mkhl@apache.org> 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  –
> > [fedora4] webapp=/solr path=/select 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=members:[subquery]&
> > members.fl=id,title&members.q={!terms+f%3Did+v%3D$row.pcdm_
> > members}&wt=json&_=1483654385162} hits=1 status=0 QTime=0
> >
> > 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=id v=$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 nature of
> > the field a problem? I have tried adding separator=' ' to both the
> > [subquery] and {!terms}, but to no avail.
> >
> > Thanks,
> > -Peter
> >
> > On Thu, Jan 5, 2017 at 4:38 PM, Mikhail Khludnev <mkhl@apache.org>
> wrote:
> >
> > > Hello,
> > >
> > > Can you add pcdm_members into fl to make sure it's stored?
> > > Also please add the following param
> > > members.logParamsList=q,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 other
> > 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 and 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 getting
> 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=id v=$row.pcdm_members}",
> > > >       "wt": "json",
> > > >       "_": "1483641932207"
> > > >     }
> > > >   },
> > > >   "response": {
> > > >     "numFound": 1,
> > > >     "start": 0,
> > > >     "docs": [
> > > >       {}
> > > >     ]
> > > >   }
> > > > }
> > > >
> > > > Any pointers on what I am missing? Are there any configuration
> 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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message