Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index date intervals that use null as one of the ends. #110

Merged
merged 2 commits into from
Nov 9, 2023

Conversation

rosiel
Copy link
Member

@rosiel rosiel commented Nov 2, 2023

GitHub Issue: #109

  • Other Relevant Links (Google Groups discussion, related pull requests,
    Release pull requests, etc.)

What does this Pull Request do?

Indexes EDTF years for dates formatted as intervals where one end (start or end) is just null, e.g. 2020/ or /1999.

Removes error messages "Could not parse EDTF value 2020/ for node/nid".

What's new?

  • Looks for / as well as ../ as signifier of an empty start of interval, and / as well as /.. at the end of an interval.

  • Also switches to use the calculated $end_year being the current year or the configured "end date value" in the EDTF Year processor. It looks like this was created but never implemented.

  • Does this change require documentation to be updated? no

  • Does this change add any new dependencies? no

  • Does this change require any other modifications to be made to the repository
    (i.e. Regeneration activity, etc.)? You may want to re-index your content if you have nulls in your intervals.

  • Could this change impact execution of existing code? no

How should this be tested?

Recreate issue #109

  • Alter the form for repository item so that Date Issued allows intervals.
  • In a node, enter in Date Issued an interval with a null start or end date e.g. 1999/
  • Save the node.
  • Go to the watchdog logs, see that error message "Could not parse EDTF value 1999/ for node/nid".
  • Search content for your node, and see that the "Year" facet does not get populated with the years between 1999 and now (or up to whatever you have configured in the EDTF Year Search API Processor)
  • If you want, go to Solr and see that its itm_edtf_year field is empty.

With this PR:

  • Edit the date to a different date range and save the node.
  • You should not see an error in watchdog.
  • You can go to a search page and see all the relevant years in the "Year" facet.
  • If you go to Solr, itm_edtf_year holds all the configured values.

Additional Notes:

Any additional information that you think would be helpful when reviewing this
PR.

Interested parties

Tag @seth-shaw-asu

Copy link
Member

@seth-shaw-asu seth-shaw-asu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️

@seth-shaw-asu seth-shaw-asu merged commit e799093 into 2.x Nov 9, 2023
6 checks passed
@seth-shaw-asu seth-shaw-asu deleted the intervals-with-null branch November 9, 2023 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants