Highlighting in subqueries?

2017-09-14 Thread Peter Matthew Eichman
Hello all,

Is it possible to highlight the results of subqueries?

Thanks,
-Peter

-- 
Peter Eichman
Senior Software Developer
University of Maryland Libraries
peich...@umd.edu


Highlighting all hits in a search with the Collapse/Expand filter in place

2017-08-08 Thread Peter Matthew Eichman
Hello all,

We have a Solr index that contains documents representing OCR text blocks
that each have a reference to the page they appear on. The pages are also
Solr documents in our index. We have successfully used the Collapse/Expand
query parser to group all of the text blocks that appear on one page
together.

However, when we add highlighting, only the main document in each collapsed
set has highlighted snippets in the "highlighting" section of the response.
Is there a way to tell Solr to use the full result set, and not the
collapsed one, when highlighting?

Thanks.
-Peter

-- 
Peter Eichman
Senior Software Developer
University of Maryland Libraries
peich...@umd.edu


Re: Getting "Error getting file length for [segments_5]" warnings in Solr 6.4.0

2017-02-15 Thread Peter Matthew Eichman
Shawn,

We have confirmed that yes, this is just log noise, and possibly related to
the admin interface and not the actual indexing process. As for indexing
stopping, that was not actually the case. I got confused about how many
documents were in the collection I was indexing, and thought there should
have been more.

Thanks,
-Peter

On Tue, Feb 14, 2017 at 6:10 PM, Shawn Heisey  wrote:

> On 2/14/2017 9:57 AM, Peter Matthew Eichman wrote:
> > I am running Solr 6.4.0, and while I am attempting to index my Fedora
> > 4 data, I keep getting warning messages in my solr.log: "WARN
> > (qtp401424608-18) [ x:fedora4] o.a.s.h.a.LukeRequestHandler Error
> > getting file length for [segments_5]". And after that, the indexing
> > stops, and the core is left in a non-current state until I issue a
> > manual commit request to it.
>
> I have seen this warning frequently on newer Solr versions.  It doesn't
> seem to actually affect Solr's operation, it just results in a lot of
> excess logging.  It is unlikely to cause issues with indexing.
>
> In your statement, what does "the indexing stops" mean?  This is quite
> vague about what's actually happening.  Error messages related to the
> *indexing* have not been provided.  Are your indexing clients receiving
> any error messages?
>
> Thanks,
> Shawn
>
>


-- 
Peter Eichman
Senior Software Developer
University of Maryland Libraries
peich...@umd.edu


Re: Getting "Error getting file length for [segments_5]" warnings in Solr 6.4.0

2017-02-14 Thread Peter Matthew Eichman
It is not. This is happening for other segment files, not just segment_5,
too.

On Tue, Feb 14, 2017 at 12:04 PM, David Hastings <
hastings.recurs...@gmail.com> wrote:

> well, if you look at the error:
> NoSuchFileException
>
> its looking for the segment file for generation 5, are you sure its
> present?
>
> On Tue, Feb 14, 2017 at 11:57 AM, Peter Matthew Eichman 
> wrote:
>
> > Hello all,
> >
> > I am running Solr 6.4.0, and while I am attempting to index my Fedora 4
> > data, I keep getting warning messages in my solr.log: "WARN
> >  (qtp401424608-18) [   x:fedora4] o.a.s.h.a.LukeRequestHandler Error
> > getting file length for [segments_5]". And after that, the indexing
> stops,
> > and the core is left in a non-current state until I issue a manual commit
> > request to it.
> >
> > What might be causing this behavior? We did migrate this core from Solr 4
> > to Solr 6, so I was thinking it might be related to some config setting
> > that works in 4 but messes up in 6?
> >
> > Here is the full stack trace from the log:
> >
> > 2017-02-14 16:51:11.429 WARN  (qtp401424608-18) [   x:fedora4]
> > o.a.s.h.a.LukeRequestHandler Error getting file length for [segments_5]
> > java.nio.file.NoSuchFileException:
> > /apps/solr/solr64/cores/fedora4/data/index/segments_5
> > at
> > sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
> > at
> > sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
> > at
> > sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
> > at
> > sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(
> > UnixFileAttributeViews.java:55)
> > at
> > sun.nio.fs.UnixFileSystemProvider.readAttributes(
> > UnixFileSystemProvider.java:144)
> > at
> > sun.nio.fs.LinuxFileSystemProvider.readAttributes(
> > LinuxFileSystemProvider.java:99)
> > at java.nio.file.Files.readAttributes(Files.java:1737)
> > at java.nio.file.Files.size(Files.java:2332)
> > at
> > org.apache.lucene.store.FSDirectory.fileLength(FSDirectory.java:243)
> > at
> > org.apache.lucene.store.NRTCachingDirectory.fileLength(
> > NRTCachingDirectory.java:128)
> > at
> > org.apache.lucene.store.FilterDirectory.fileLength(
> > FilterDirectory.java:67)
> > at
> > org.apache.solr.handler.admin.LukeRequestHandler.getFileLength(
> > LukeRequestHandler.java:614)
> > at
> > org.apache.solr.handler.admin.LukeRequestHandler.getIndexInfo(
> > LukeRequestHandler.java:587)
> > at
> > org.apache.solr.handler.admin.LukeRequestHandler.handleRequestBody(
> > LukeRequestHandler.java:138)
> > at
> > org.apache.solr.handler.RequestHandlerBase.handleRequest(
> > RequestHandlerBase.java:166)
> > at org.apache.solr.core.SolrCore.execute(SolrCore.java:2306)
> > at
> > org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:658)
> > at org.apache.solr.servlet.HttpSolrCall.call(
> > HttpSolrCall.java:464)
> > at
> > org.apache.solr.servlet.SolrDispatchFilter.doFilter(
> > SolrDispatchFilter.java:345)
> > at
> > org.apache.solr.servlet.SolrDispatchFilter.doFilter(
> > SolrDispatchFilter.java:296)
> > at
> > org.eclipse.jetty.servlet.ServletHandler$CachedChain.
> > doFilter(ServletHandler.java:1691)
> > at
> > org.eclipse.jetty.servlet.ServletHandler.doHandle(
> ServletHandler.java:582)
> > at
> > org.eclipse.jetty.server.handler.ScopedHandler.handle(
> > ScopedHandler.java:143)
> > at
> > org.eclipse.jetty.security.SecurityHandler.handle(
> > SecurityHandler.java:548)
> > at
> > org.eclipse.jetty.server.session.SessionHandler.
> > doHandle(SessionHandler.java:226)
> > at
> > org.eclipse.jetty.server.handler.ContextHandler.
> > doHandle(ContextHandler.java:1180)
> > at
> > org.eclipse.jetty.servlet.ServletHandler.doScope(
> ServletHandler.java:512)
> > at
> > org.eclipse.jetty.server.session.SessionHandler.
> > doScope(SessionHandler.java:185)
> > at
> > org.eclipse.jetty.server.handler.ContextHandler.
> > doScope(ContextHandler.java:1112)
> > at
> > org.eclipse.jetty.server.handler.ScopedHandler.handle(
> > ScopedHandler.java:141)
> > at
> > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(
> &

Getting "Error getting file length for [segments_5]" warnings in Solr 6.4.0

2017-02-14 Thread Peter Matthew Eichman
Hello all,

I am running Solr 6.4.0, and while I am attempting to index my Fedora 4
data, I keep getting warning messages in my solr.log: "WARN
 (qtp401424608-18) [   x:fedora4] o.a.s.h.a.LukeRequestHandler Error
getting file length for [segments_5]". And after that, the indexing stops,
and the core is left in a non-current state until I issue a manual commit
request to it.

What might be causing this behavior? We did migrate this core from Solr 4
to Solr 6, so I was thinking it might be related to some config setting
that works in 4 but messes up in 6?

Here is the full stack trace from the log:

2017-02-14 16:51:11.429 WARN  (qtp401424608-18) [   x:fedora4]
o.a.s.h.a.LukeRequestHandler Error getting file length for [segments_5]
java.nio.file.NoSuchFileException:
/apps/solr/solr64/cores/fedora4/data/index/segments_5
at
sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
at
sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at
sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at
sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
at
sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144)
at
sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
at java.nio.file.Files.readAttributes(Files.java:1737)
at java.nio.file.Files.size(Files.java:2332)
at
org.apache.lucene.store.FSDirectory.fileLength(FSDirectory.java:243)
at
org.apache.lucene.store.NRTCachingDirectory.fileLength(NRTCachingDirectory.java:128)
at
org.apache.lucene.store.FilterDirectory.fileLength(FilterDirectory.java:67)
at
org.apache.solr.handler.admin.LukeRequestHandler.getFileLength(LukeRequestHandler.java:614)
at
org.apache.solr.handler.admin.LukeRequestHandler.getIndexInfo(LukeRequestHandler.java:587)
at
org.apache.solr.handler.admin.LukeRequestHandler.handleRequestBody(LukeRequestHandler.java:138)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:166)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:2306)
at
org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:658)
at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:464)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:345)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:296)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1691)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
at org.eclipse.jetty.server.Server.handle(Server.java:534)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
at
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
at
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at
org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
at
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
at
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
at
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
at java.lang.Thread.run(Thread.java:745)

Thanks,
-Peter

-- 
Peter Eichman
Senior Software Developer
University of Maryland Libraries
peich...@umd.edu


Re: Subqueries

2017-01-06 Thread Peter Matthew Eichman
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 <
> peich...@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 
> > > 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 t

Re: Subqueries

2017-01-06 Thread Peter Matthew Eichman
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 
> 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 
> 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 <
> peich...@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,
> > 

Re: Subqueries

2017-01-05 Thread Peter Matthew Eichman
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  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 
> 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
> > peich...@umd.edu
> >
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
>



-- 
Peter Eichman
Senior Software Developer
University of Maryland Libraries
peich...@umd.edu


Subqueries

2017-01-05 Thread Peter Matthew Eichman
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
peich...@umd.edu