geobtaa / geoportal

Big Ten Academic Alliance Geoportal
Other
10 stars 5 forks source link

Investigate strategy for applying temporal range for single records #129

Closed karenmajewicz closed 4 years ago

karenmajewicz commented 6 years ago

Records representing interactive resources or collections may cover a wide time period. Examples:

Minnesota Historical Aerial Photographs Online (MHAPO), 1920-2000 Wisconsin Historic Aerial Imagery Finder, 1937-1941

Is there a way to index the full temporal range for a single record to enable a user to find these resources using facets or advanced search? If a user tries to limit their search to 1940-1941 using the year limiter, they will not see the Wisconsin record, which gets indexed as 1937. Maybe we need an adjustment to the schema. Here are the affected time related elements from our metadata schema profile:

Could we somehow change solr_year to be multifaceted?

karenmajewicz commented 5 years ago

Added on GBL GitHub: https://github.com/geoblacklight/geoblacklight/issues/746

ewlarson commented 5 years ago

Looks like the Samvera folk added DateRangeField support to their solr schema: https://github.com/samvera/hydra-head/commit/da83f62f905a0534f1531c25da3f4b8b3ed00fe6

Some additional information about how it works: https://lucidworks.com/post/solrs-daterangefield-perform/

ewlarson commented 5 years ago

I have a feature branch working where I've added "b1g_date_range_drsim" to a couple fixtures.

Looks like we could populate that date range field and use it to generate our "Time Period" field. See similar usage example below:

    # Example Date Range facet 
    config.add_facet_field 'date_range_facet_field', label: 'Date Range', :query => {
       :years_1 => { label: 'within 1 Year', fq: "b1g_date_range_drsim:[#{Time.zone.now.year} TO *]" },
       :years_5 => { label: 'within 5 Years', fq: "b1g_date_range_drsim:[#{Time.zone.now.year - 5 } TO *]" },
       :years_10 => { label: 'within 10 Years', fq: "b1g_date_range_drsim:[#{Time.zone.now.year - 10 } TO *]" },
       :years_25 => { label: 'within 25 Years', fq: "b1g_date_range_drsim:[#{Time.zone.now.year - 25 } TO *]" }
    }

    # Existing Year/Time Period query facet 
    config.add_facet_field 'time_period', :label => 'Time Period', :query => {
      '1500s' => { :label => '1500s', :fq => "solr_year_i:[1500 TO 1599]" },
      '1600s' => { :label => '1600s', :fq => "solr_year_i:[1600 TO 1699]" },
      '1700s' => { :label => '1700s', :fq => "solr_year_i:[1700 TO 1799]" },
      '1800-1849' => { :label => '1800-1849', :fq => "solr_year_i:[1800 TO 1849]" },
      '1850-1899' => { :label => '1850-1899', :fq => "solr_year_i:[1850 TO 1899]" },
      '1900-1949' => { :label => '1900-1949', :fq => "solr_year_i:[1900 TO 1949]" },
      '1950-1999' => { :label => '1950-1999', :fq => "solr_year_i:[1950 TO 1999]" },
      '2000-2004' => { :label => '2000-2004', :fq => "solr_year_i:[2000 TO 2004]" },
      '2005-2009' => { :label => '2005-2009', :fq => "solr_year_i:[2005 TO 2009]" },
      '2010-2014' => { :label => '2010-2014', :fq => "solr_year_i:[2010 TO 2014]" },
      '2015-present' => { :label => '2015-present', :fq => "solr_year_i:[2015 TO #{Time.now.year}]"}
    }, collapse: false
ewlarson commented 5 years ago

We'll likely want to replace our Blacklight Range Limit plugin with a basic year_start and year_end form that converts the data entered into Date Range Format

karenmajewicz commented 4 years ago

Test record here: https://geodev.btaa.org/catalog/05d-09

05d-09.json.zip

karenmajewicz commented 4 years ago

Add this date range element to all metadata records

karenmajewicz commented 4 years ago

Added b1g_date_range_drsim to all records that had dates on the dev site.