geobtaa / geoportal

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

Increase dropdown list items in the Advanced Search #471

Closed karenmajewicz closed 1 year ago

karenmajewicz commented 2 years ago

The Advanced Search page has a useful "Limit Results by" section that includes Resource Class, Resource Type, and Provider. Since implementing the widget, we adjusted our metadata schema and now how over 300 "Providers." However, the widget only shows the first 16 values.

Can we increase the number of selectable values? Is there another solution for this field?

karenmajewicz commented 2 years ago

More info: The "Limit Results by" dropdown boxes will only allow the user to limit by those first 16 values. Typing in another value will not work.

Example: Try to limit by the Provider "University..". There should be numerous possible values here. However, the app says "No results matched"

Image

ewlarson commented 2 years ago

Somewhere along the line we lost the ability to choose from a large set of facet options here.

Currently, the AdvancedSearch controller is passing the CatalogController facet configuration facet limits along to Solr. This limit then makes the number of facet choices quite small on the advanced search page.

2022-07-27 16:46:50.824 INFO  (qtp208866101-16) [   x:geoportal-core-development] o.a.s.c.S.Request [geoportal-core-development]  webapp=/solr path=/select params={bf=if(exists(b1g_child_record_b),0,100)^0.5&f.pcdm_memberOf_sm.facet.limit=9&f.dct_isVersionOf_sm.facet.limit=9&fq=b1g_publication_state_s:published&fq=-gbl_suppressed_b:+true&defType=lucene&f.b1g_language_sm.facet.limit=16&f.gbl_indexYear_im.facet.limit=11&f.gbl_resourceClass_sm.facet.limit=9&f.gbl_resourceType_sm.facet.limit=9&wt=json&f.schema_provider_s.facet.limit=16&f.dct_creator_sm.facet.limit=9&facet.field=schema_provider_s&facet.field=gbl_resourceType_sm&facet.field=gbl_resourceClass_sm&q.alt=*:*&f.dcat_theme_sm.facet.limit=9&f.dct_replaces_sm.facet.limit=9&f.dct_isReplacedBy_sm.facet.limit=9&start=0&sort=gbl_indexYear_im+asc,+dct_title_sort+asc&rows=0&f.b1g_dct_mediator_sm.facet.limit=16&facet.limit=-1&q={!lucene}*:*&f.dct_relation_sm.facet.limit=9&f.dct_source_sm.facet.limit=9&facet=true&f.dct_isPartOf_sm.facet.limit=9&f.dct_spatial_sm.facet.limit=9&facet.sort=index} hits=50019 status=0 QTime=6

As we’ve not changed this code recently, I suspect upstream changes in Blacklight introduced this bug.

The only way to get all the values to appear on the advanced search page is to remove the “include Blacklight::Solr::SearchBuilderBehavior” line from our search_builder.rb class, however that breaks basic search/sorting/paging behavior in the application elsewhere.

Options to consider:

  1. Write our own search builder concern to strip the specific.facet.limit params from getting to Solr when AdvancedSearch controller is involved
  2. Add a controller specifically for advanced search configuration (might not work as blacklight config appears to be called somewhere here)
  3. Use Blacklight's newish advanced search functionality

Blacklight's advanced search feature is already running in production: https://geo.btaa.org/catalog/advanced This feature adds much (most?) of the old BL advanced search plugin into Blacklight natively. It also has some issues/polish to resolve -- out of the box it lists all our facet-able fields.