-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add parasolr last modified mixin (#375) #669
Conversation
kmcelwee
commented
Feb 28, 2022
- We want to track all fields correct? Let me know if I should add a filter.
- Looks like next time we do a release for parasolr we should make sure to rebuild the docs. https://parasolr.readthedocs.io/en/latest/search.html?q=SolrLastModifiedMixin&check_keywords=yes&area=default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the search I think we do want all documents — we only include public/non-suppressed documents in the search, but if a document was marked as suppressed that should be reflected in the search last-modified.
For the document detail views, we want the last modification for the single document being viewed. Please apply to all document detail views — perhaps generalize/rename DocumentPastIdMixin
to a document detail base class and add the last-modified behavior there.
I'm not sure the view was added to the code docs, please check. (I didn't even remember the view had been generalized and moved to parasolr) |
I tried testing this, and it seems to work as is. Would you mind confirming that this is testing the behavior you're looking for? 2bd1b05 |
Yes, the existing logic is correct; this is a good test to confirm it. |
It wasn't. I made a PR: Princeton-CDH/parasolr#71 |
✅ c5c3a0f |
Co-authored-by: Rebecca Sutton Koeser <rlskoeser@users.noreply.github.com>
Codecov Report
@@ Coverage Diff @@
## develop #669 +/- ##
===========================================
+ Coverage 98.64% 98.74% +0.10%
===========================================
Files 121 121
Lines 5677 6159 +482
===========================================
+ Hits 5600 6082 +482
Misses 77 77 |
""" | ||
return {"pgpid_i": self.kwargs["pk"]} | ||
"""Filter solr last modified query by pgpid""" | ||
return {"pgpid_i": self.kwargs["pk"], "item_type_s": "document"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry if I was unclear: we need the item type filter on the search view. (I wasn't thinking about adding it here: it may not strictly be necessary here, but it's probably a good idea)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh whoops, yeah, here it is 7e57d3f