SearchWorks icon indicating copy to clipboard operation
SearchWorks copied to clipboard

Facet based on recent publication date

Open ahafele opened this issue 8 years ago • 7 comments

Faculty would like to be able to refine the search so that only the papers published in the last week would appear.

https://jirasul.stanford.edu/jira/browse/SW-1914

ahafele avatar Dec 19 '17 20:12 ahafele

Devs to check if this is possible given what data we have available in articles+.

Ticket to "design needed" if we can do this.

taylor-steve avatar Apr 07 '25 17:04 taylor-steve

@dbranchini: I think we could practically query for anything to do with month ranges:

  • Articles published this month
  • Articles published in a specific month
  • Articles published in a month range

The finest level of granularity EDS offers is month ranges: https://developer.ebsco.com/eds-api/docs/using-min-and-max-date-range-to-filter-results

For example, I've confirmed that a search with limiter DT1:2025-03/9999-12 returned articles published in March 2025 or later, DT1:2025-04/2025-04 returned articles published in 2025-04, etc...

The bib data does typically have the day:

"BibEntity": {
  "Dates": [
    {
      "D": "15",
      "M": "03",
      "Type": "published",
      "Y": "2025"
    }
  ]
}

However the result set coming from EDS does not sort at this level, even when sorted by newest date. It only sorts by the year & month. I think filtering at the day level would be impractical as we'd need to consume all the result pages. These sets can be quite large, even looking at the current month.

The edsapi-ruby gem supports limiters.

taylor-steve avatar Apr 15 '25 00:04 taylor-steve

We can't do the last 30 days either, right? It's a specific month only if I understand this correctly. I'm looking at Google Scholar and they provide specific years, "Since 2025, Since 2024, Since 2021, etc. I don't love that phrasing, but I'm guessing they did research on it. @saseestone , what about starting with the following assuming it's May 2025?

  • Since Apr 2025
  • Since Jan 2025
  • Since Jan 2024

OR (but this gets more confusing and problematic quickly):

  • Within the past 2 months (from Apr 2025)
  • Within the past year (from May 2024)
  • Within the past 2 years (from May 2023)

I lean toward the first version which mirrors Google Scholar.

dbranchini avatar May 09 '25 23:05 dbranchini

I prefer the first version as well. :)

saseestone avatar May 12 '25 14:05 saseestone

We can't do the last 30 days either, right?

Correct.

taylor-steve avatar May 12 '25 17:05 taylor-steve

@dbranchini or @saseestone given that this will intersect with the existing date range slider, do you have any specific thoughts on how the two should interact or is that left for the developers to decide?

I believe they use the same field so I don't think it'll be possible to have both this new facet link and the existing date range facet with active values at the same time, but I'm assuming we don't want to completely remove the date range facet slider?

Edit: @dnoneill has corrected me that they are different, so we can likely keep both.

taylor-steve avatar May 19 '25 21:05 taylor-steve

~~Based on previous conversations with Darcy, I do think we want to remove the date range facet slider. I took a quick look in Figma, and her latest work is here: https://www.figma.com/design/fsVWCX66bpvFZGKEHNRBS5/SearchWorks-4.0?node-id=10-6317&t=yQBttPFW13yaJ6Ih-0 but it's not specific to Articles+, nor do I think she's looked at it in awhile.~~

Standup on 5/21 confirmed that we will keep both the links and the date slider/histogram

The spirit of this ticket was really to see what is possible, which is why she doesn't have designs specified.

saseestone avatar May 19 '25 21:05 saseestone