Date searching gone haywire.

27 views
Skip to first unread message

Nathan Fralick

unread,
Mar 6, 2017, 3:05:43 PM3/6/17
to DSpace Technical Support
When using date searching in our repository, the search doesn't function as one would think. It almost acts as a key word search. I am sure the problem lies within the dc code, where date isn't referencing the right index. I am a beginner at coding and could use some help/advice troubleshooting. The date code for the form is below. Any help would be appreciated.

<field>
          <dc-schema>dc</dc-schema>
          <dc-element>date</dc-element>
          <dc-qualifier>issued</dc-qualifier>
          <repeatable>false</repeatable>
          <label>Date of Document(s)</label>
          <input-type>date</input-type>
          <hint>Enter the date of the minutes, reports, etc.</hint>
          <required>You must enter at least the year.</required>
</field>

Nathan Fralick
Digital Resources Librarian
Allegheny College, Pelletier Library

Alan Orth

unread,
Mar 8, 2017, 4:49:53 AM3/8/17
to Nathan Fralick, DSpace Technical Support
Hi, Nathan.

What's the problem exactly? Say you have an item with a dc.date.issued of 1992-06-26, if you use the advanced search to search for items that have an issue date containing 1992-06, you should get the result. See this example on the DSpace Demo:


Regards,

--
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 post to this group, send email to dspac...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.
--

Alan Orth

unread,
May 25, 2020, 1:15:12 PM5/25/20
to Nathan Fralick, DSpace Technical Support
Dear Nathan,

Coming back to this thread three years later after I realized you were right (a user of mine reported the same issue on our repository recently)! The XMLUI's Discovery advanced search filters do not work correctly for dates.

In my own example above you can't see the issue because there is only one item matching the filter term. I edited one item's issue date on the DSpace 6 demo repository and you can clearly see that the second item in the search results *should not* match. In this case the search filter for issue date containing "1992-06" returns results for the item having an issue date of 1992-06-26 as expected, but also includes one with an issue date of 1992-01-06.

This is actually a bug! I will file a bug report... it affects at least DSpace 5 and DSpace 6.

Regards,
Screenshot_2020-05-25 Search-fs8.png
Reply all
Reply to author
Forward
0 new messages