gwu-libraries / launchpad

A django based system that provides a stable URL for every item in the library's catalog. Various discovery services will link to these URLs. The page for each item will in turn link out to various other resources that provide methods for accessing the content of the items.
MIT License
15 stars 9 forks source link

added wildcard on year, end to match trailing punctuation. Fixes #1149 #1186

Closed cummingsm closed 7 years ago

cummingsm commented 7 years ago

Reworked to handle year alone. Reworked to handle start + end combination. Note, no wildcard should be used when both the year start and end are specified. Test cases:

author key,year from, year to, returned titles, query string generated: paynell,1560,null,null,2,author:paynell AND publicationdate:[1560*] correctly accepts "1560." vs master no result paynell,1560,null,null,NONE,author:paynell AND publicationdate:1560

paynell,null,1560,null,2,author:paynell AND publicationdate:[1560*] correctly limits"1560." vs master too many result paynell,null,1560,null,45,author:paynell AND publicationdate:[1560-]

paynell,null,null,1560,2,author:paynell AND publicationdate:[-1560*] correctly limits "1560." vs master too many result paynell,null,1560,null,45,author:paynell AND publicationdate:[1560-]

paynell,null,1554,1560,11,author:paynell AND publicationdate:[1554-1560] handled the same vs master, same result

languet,1718,null,null,4,author:languet AND publicationdate:[1718*] finds four vs master, only two languet,1718,null,null,2,author:languet AND publicationdate:1718