off by one calendar day when using create_date in search

Bug #1241024 reported by Jason Etheridge
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Confirmed
Low
Mike Rylander

Bug Description

In the TPAC, entering a search like this:

create_date(2013-10-01,2013-10-15)

will produce SQL that includes a clause like this:

AND bre.create_date BETWEEN $_24259$2013-10-01T00:00:00$_24259$ AND $_24259$2013-10-15T00:00:00$_24259$

So we're actually omitting records created on 2013-10-15, which goes against expectations.

Tags: search
Revision history for this message
Lebbeous Fogle-Weekley (lebbeous) wrote :
Changed in evergreen:
milestone: none → 2.5.1
status: New → Confirmed
importance: Undecided → Low
tags: added: pullrequest search
Changed in evergreen:
milestone: 2.5.1 → 2.5.0
Revision history for this message
Lebbeous Fogle-Weekley (lebbeous) wrote :

(There are enough milestones available for bug targeting right now to confuse me. If 2.5.0 and 2.4.4 are inappropriate choices, just change them.)

Revision history for this message
Mike Rylander (mrylander) wrote :

My concern with that has to do with indexing -- or, more specifically, the likely non-use of the existing index on biblio.record_entry.create_date. The on there may not be used at all, of course, in which case swapping it for a DATE-granular index would be better. Analysis of a production site (pg_statio_user_indexes, IIRC) would be in order to decide, IMO.

Dan Wells (dbw2)
Changed in evergreen:
milestone: 2.5.0 → 2.5.1
Ben Shum (bshum)
Changed in evergreen:
milestone: 2.5.1 → 2.5.2
Dan Wells (dbw2)
Changed in evergreen:
milestone: 2.5.2 → 2.6.0-alpha1
Dan Wells (dbw2)
Changed in evergreen:
milestone: 2.6.0-alpha1 → 2.6.0-beta1
Dan Wells (dbw2)
Changed in evergreen:
milestone: 2.6.0-beta1 → 2.6.0-rc1
Changed in evergreen:
milestone: 2.6.0-rc1 → none
milestone: none → 2.next
no longer affects: evergreen/2.4
Revision history for this message
Ben Shum (bshum) wrote :

Mike mentions adding a new index in comment #3.

Something to fix for 2.7.1!

Changed in evergreen:
milestone: 2.next → 2.7.1
assignee: nobody → Mike Rylander (mrylander)
Changed in evergreen:
milestone: 2.7.1 → 2.7.2
Revision history for this message
Kathy Lussier (klussier) wrote :

Removing the pullrequest tag since work is ongoing.

tags: removed: pullrequest
Galen Charlton (gmc)
Changed in evergreen:
milestone: 2.7.2 → 2.7.3
Revision history for this message
Ben Shum (bshum) wrote :

Removing milestones while work is still ongoing for this issue.

Changed in evergreen:
milestone: 2.7.3 → none
no longer affects: evergreen/2.5
no longer affects: evergreen/2.6
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.