Hi Tim,
thanks for your suggestions, but unfortunately, I already followed those
steps. I have just re-run the "dspace index-discovery -b" command (just
in case I missed something in the past, notice now the
"SolrIndexer.lastIndexed" field below), but Solr still doesn't index the
"dc.date.issued" field.
This is a query directly executed in Solr for a specific collection:
http://localhost:8983/solr/search/select?indent=true&q.op=OR&q=search.resourceid%3A17e7c35e-df03-454e-87e6-67c01c5b8d19
And the result is (I have edited a few fields to anonymize the result):
|{ "responseHeader":{ "status":0, "QTime":0, "params":{
"q":"search.resourceid:17e7c35e-df03-454e-87e6-67c01c5b8d19",
"indent":"true", "q.op":"OR", "_":"1717165474861"}},
"response":{"numFound":1,"start":0,"numFoundExact":true,"docs":[ {
"SolrIndexer.lastIndexed":"2024-05-31T14:18:49.477Z",
"search.uniqueid":"Collection-17e7c35e-df03-454e-87e6-67c01c5b8d19",
"search.resourcetype":"Collection",
"search.resourceid":"17e7c35e-df03-454e-87e6-67c01c5b8d19",
"read":["gfefa234a-ad99-40d9-aa36-47a24494dffe"],
"location.parent":"19d3bd5a-e264-40a3-957b-082da3de1417",
"handle":"edited",
"location":["m19d3bd5a-e264-40a3-957b-082da3de1417",
"m5a608209-b347-4f85-97d0-1bcbdf46bddc"],
"location.comm":["19d3bd5a-e264-40a3-957b-082da3de1417",
"5a608209-b347-4f85-97d0-1bcbdf46bddc"], "dc.description":["Edited
description"], "dc.description.abstract":["Edited abstract"],
"dc.description.abstract_hl":["Edited abstract"],
"dc.title":["Edited title"], "dc.title_hl":["Edited title"],
"dc.title_sort":"Edited title", "dspace.entity.type":["none"],
"search.entitytype":"none", "dspace.entity.type_hl":["none"],
"_version_":1800578142881972224, "latestVersion":true,
"lastModified":"2024-05-31T14:18:49.545Z"}] }} |
I can confirm that the collection has the "dc.date.issued" metadata value:
dspace=# select * from metadatafieldregistry where metadata_field_id=22;
metadata_field_id | metadata_schema_id | element | qualifier
| scope_note
-------------------+--------------------+---------+-----------+--------------------------------------
22 | 1 | date | issued | Date
of publication or distribution.
(1 row)
dspace=# select * from metadatavalue where
dspace_object_id='17e7c35e-df03-454e-87e6-67c01c5b8d19';
metadata_value_id | metadata_field_id | text_value | text_lang |
place | authority | confidence | dspace_object_id
-------------------+-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------+-------+-----------+------------+--------------------------------------
109078 | 35 | Edited value |
| 0 | | -1 | 17e7c35e-df03-454e-87e6-67c01c5b8d19
109079 | 36 | Edited value
| | 0 | | -1 |
17e7c35e-df03-454e-87e6-67c01c5b8d19
9264 | 34 |
https://hdl.handle.net/edited | | 0 |
| -1 | 17e7c35e-df03-454e-87e6-67c01c5b8d19
9265 | 22 | 2019-09-02 |
| 0 | | -1 | 17e7c35e-df03-454e-87e6-67c01c5b8d19
9268 | 216 | Edited value |
| 0 | | -1 | 17e7c35e-df03-454e-87e6-67c01c5b8d19
9269 | 73 | Edited value |
| 0 | | -1 | 17e7c35e-df03-454e-87e6-67c01c5b8d19
(6 rows)
In the above queries, I can see that the collection has "2019-09-02" as
the date for the metadata_field_id "22", which corresponds to
"dc.date.issued".
As I also said in my original post, I'm able to set, retrieve and modify
the "dc.date.issued" value in my custom UI forms. But when the queries
have to go through Solr, the value is missing.
Finally, I've checked the discovery.xml, and I didn't change anything
regarding the indexing of Communities and Collections. My
"toIgnoreMetadataFields" configuration is the default (exclude
"dc.rights" for communities and collections and nothing else).
I also thought that being "dc.date.issued" a standard field, it would be
indexed by default. And to be fair, I've been unable to find anything in
discovery.xml that suggests that it shouldn't be like that. But the fact
is that it is not being indexed.
Maybe I'm missing some other configuration.
Thanks for your suggestions, but I'm afraid I'm still in the same situation.
Let's see if anybody else can shed light on this issue...
Thanks!
Abel
El 31/05/2024 a las 16:16, DSpace Technical Support escribió:
Hi Abel,
While I don't know the exact answer here (off the top of my head),
here's the steps that I'd recommend taking to find the solution.
First, you should check Solr itself (via http://localhost:8983/solr/
if it's running on standard ports on your localhost). Check the
"search" core and search for a Community to see if the
"dc.date.issued" field is indexed into Solr.
If it is not, then you could try reindexing your site to see if that
makes a difference (`dspace index-discovery -b`).
You also can reference the DSpace Discovery documentation
<https://wiki.lyrasis.org/display/DSDOC7x/Discovery> , especially the
settings in discovery.xml to see if something new needs to be added to
the Community/Collection settings there. However, since
"dc.date.issued" is a standard field in DSpace, I *think* it's already
configured in discovery.xml to be indexed by default. (Hopefully
someone else on this list can correct me if I'm wrong.) Basically,
though, this discovery.xml file is the settings for what fields should
be indexed & which are available as facets/filters in Solr.
Tim
On Thursday, May 23, 2024 at 11:07:20 AM UTC-5 abg...@gmail.com wrote:
Hi all,
I'd like to add a custom metadata field for Communities and
Collections. Let's say, for example, that I want to store the
creation date of the Commmunity/Collection in a 'dc.date.issued'
field.
So far, I have modified the community and collection forms in the
UI to be able to set and modify such fields, and it works ok.
However, I'd like to be able to search for Communities and
Collections based on those custom fields too. E.g., a query like
this one:
localhost:8080/server/api/discover/search/objects?query=dc.date.issued:2022&dsoType=COMMUNITY
<http://localhost:8080/server/api/discover/search/objects?query=dc.date.issued:2022&dsoType=COMMUNITY>
should return Communities created in 2022.
However, the query returns an empty result. I've seen that Solr is
not indexing the 'dc.date.issued' field for
Communities/Collections, which makes me think that that is the
root cause for the empty results.
How can I configure the back-end to tell Solr that
'dc.date.issued' should be also indexed for Communities/Collections?
I've checked the schema.xml in the Solr config, as well as the
discovery.xml file, but I'm afraid I'm a bit lost.
Any advice would be appreciated.
Regards,
Abel
--
All messages to this mailing list should adhere to the Code of
Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dspace-tech/fe08c14d-c528-4ecf-8773-d327127aca94n%40googlegroups.com
<https://groups.google.com/d/msgid/dspace-tech/fe08c14d-c528-4ecf-8773-d327127aca94n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
Abel Gómez Llana, PhD
a...@gomez.llana.me
https://abel.gomez.llana.me
--
All messages to this mailing list should adhere to the Code of Conduct:
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dspace-tech/b2e7e92e-4117-4a75-b495-36ea5e1d77c1%40gmail.com.