Solr metadata statistics - query syntax

65 views
Skip to first unread message

Filippo Santoro

unread,
Feb 17, 2020, 9:39:28 AM2/17/20
to DSpace Technical Support
Hello to everyone,
I have installed an instance of DSpace 6.3 on Windows Server 2016.
Since for institutional policies cannot use default JSP frontend of DSpace (except for ordinary maintenance), I am using Solr for queries.
However, I need to get statistics from a query (as provided by the Discovery module) using Solr. For example, if I perform a search by author:

http://localhost:8090/search/select?q=search.resourcetype:2&fl=dc.contributor.author:MickeyMouse

in addition to the assets in which MickeyMouse is the author, I would obtain the number by author:

Mickey Mouse    45
Donald Duck     25
Minnie Mouse    13
Pluto           5
Goofy           3
Daisy Duck      3

How should I edit the query?

Thanks in advance.
Filippo

Alan Orth

unread,
Feb 20, 2020, 5:25:17 AM2/20/20
to Filippo Santoro, DSpace Technical Support
Dear Filippo,

I only have a comment: if you have access to localhost you could query the SQL database directly (the Solr search core is built from that data anyways). I guess it all depends on your skill in writing Solr queries versus SQL queries!

Regards,

--
All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/f97a2f69-b786-477f-bf54-2fb75090a550%40googlegroups.com.


--

Filippo Santoro

unread,
May 14, 2020, 3:35:40 PM5/14/20
to DSpace Technical Support
Hi Alan,
first of all, sorry for this monstrous delay in replying to you, but the health situation here in Italy has been really critical and only now we can breathe a sigh of relief.

The use of SQL query was the method I used previously, but I noticed that the same query made in Solr are much faster. It's clear that I don't have the skills to optimize SQL queries.
However, I finally solve the problem using Solr's Terms Components:

http://localhost:8090/search/terms?omitHeader=true&wt=json&terms.fl=author_filter&terms.limit=15&terms.prefix=Mickey%20Mouse

Thank you very much.
Regards.
Filippo

Il giorno giovedì 20 febbraio 2020 11:25:17 UTC+1, Alan Orth ha scritto:
Dear Filippo,

I only have a comment: if you have access to localhost you could query the SQL database directly (the Solr search core is built from that data anyways). I guess it all depends on your skill in writing Solr queries versus SQL queries!

Regards,

On Mon, Feb 17, 2020 at 4:39 PM Filippo Santoro <santoro...@gmail.com> wrote:
Hello to everyone,
I have installed an instance of DSpace 6.3 on Windows Server 2016.
Since for institutional policies cannot use default JSP frontend of DSpace (except for ordinary maintenance), I am using Solr for queries.
However, I need to get statistics from a query (as provided by the Discovery module) using Solr. For example, if I perform a search by author:

http://localhost:8090/search/select?q=search.resourcetype:2&fl=dc.contributor.author:MickeyMouse

in addition to the assets in which MickeyMouse is the author, I would obtain the number by author:

Mickey Mouse    45
Donald Duck     25
Minnie Mouse    13
Pluto           5
Goofy           3
Daisy Duck      3

How should I edit the query?

Thanks in advance.
Filippo

--
All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspac...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages