scientist-softserv / utk-hyku

Other
6 stars 0 forks source link

Date facet is a slider #593

Closed jillpe closed 5 months ago

jillpe commented 7 months ago

Testing Instruction

jillpe commented 6 months ago

SoftServ QA: ✅

Image

josh-morgan117 commented 6 months ago

Image

This is what appears for me first. I would need to know the dates of what's in the repository in order to set limits and then get the slider.

kirkkwang commented 6 months ago

@kidon0011 That's what we were seeing too which seems like a data issue. The blacklight range limit plugin seem to work best with dates what are just formatted as YYYY, currently it's set to the date created field, let me know if that needs to change. What we did was change a date to YYYY on a few records and then typed in those ranges, you should see those records come back in the query

josh-morgan117 commented 6 months ago

@kirkkwang I'll talk it over with Mark and Mike at our meeting today.

markpbaggett commented 6 months ago

@kirkkwang Apologies. I was traveling most of last week and didn't get around to this. I tried looking at the related code changes for this, but I haven't figured it out yet. Is this using the date_created or date_created_d field?

kirkkwang commented 6 months ago

@markpbaggett no worries, currently using date_created but can be easily switched, I believe we'd just need to update one line in the catalog controller and also the m3 profile

markpbaggett commented 6 months ago

@kirkkwang cool. what would we need to update in the m3profile?

kirkkwang commented 6 months ago

@markpbaggett

on here you can add something like:

index_documentation: displayable, searchable, date created facet
indexing:
- displayable
- stored_searchable
- facetable

to around here: https://github.com/utkdigitalinitiatives/m3_profiles/blob/main/maps/utk.yml#L1161-L1163

kirkkwang commented 6 months ago

@markpbaggett i think i'm going to go ahead and switch it to the machine readable date created because the more i think about it, the more it makes sense

markpbaggett commented 6 months ago

@josh-morgan117 I'm reindexing now. We should be able to confirm this in just a sec.

josh-morgan117 commented 6 months ago

@markpbaggett OK

markpbaggett commented 6 months ago

@kirkkwang I wonder if switching to the machine readable date has this working incorrectly now. See this on staging:

Image

kirkkwang commented 6 months ago

@markpbaggett sorry about that, i think we forgot about the m3 profile, we would need to add this

  date_created_d:
    available_on:
      class:
      - GenericWork
      - Image
      - Video
      - Audio
      - Pdf
      - Book
      - CompoundObject
      - Newspaper
    cardinality:
      maximum: 1
      minimum: 0
    multi_value: true
    controlled_values:
      format: http://www.w3.org/2001/XMLSchema#date
      sources:
      - 'null'
    definition:
      default: Machine readable date for creation date.
    display_label:
      default: Machine Readable Creation Date
    index_documentation: displayable, searchable, date created facet
    indexing:
    - displayable
    - stored_searchable
    - facetable
    mappings:
      mods_oai_pmh: mods:originInfo/mods:dateCreated
      qualified_dc_pmh: dcterms:created
      simple_dc_pmh: dc:date
    property_uri: https://dbpedia.org/ontology/completionDate
    range: http://www.w3.org/2001/XMLSchema#date
    requirement: optional
    sample_values:
    - '1999-09-09'
    syntax: EDTF

Basically, all i've changed is adding the index_documentation and - facetable

markpbaggett commented 6 months ago

@kirkkwang Just updating this to say that this works a little different not that we switched from date_created to date_created_d. I know we've talked about this, but it's not reflected in the ticket so I'm adding. Mostly it works in its current state, except without the "pretty" js bits.

Here is what I've done:

  1. Updated the m3 profile to match the above.
  2. Updated a set after adding the profile to ensure indexing is rerun.

Let me know if I should be doing more here now.

jillpe commented 5 months ago

@markpbaggett since the functionality is working for this ticket, do you have concerns with moving this ticket forward and creating a ticket for the js parts?

markpbaggett commented 5 months ago

@jillpe sounds good. Bumping.