blacklight icon indicating copy to clipboard operation
blacklight copied to clipboard

Bring ability to edit search into core blacklight

Open maxkadel opened this issue 2 months ago • 3 comments

Add a button to edit a search from the main search results page.

This is something that was in the original BlacklightAdvancedSearch gem, but that has not been ported over.

This button would then bring you to the advanced search page, with the search boxes pre-populated with the existing search parameters.

Existing implementation example:

Image Image

Acceptance criteria

  • [ ] The feature is configurable
  • [ ] When the feature is turned on, there is an "Edit search" link from the main search results page
  • [ ] This link brings you to the Advanced Search page with any terms or facets from your original search pre-populated in the form
  • [ ] Clicking search on the advanced search page takes you to updated search results.

Developer note

The advanced search and regular search do use different search syntax, so care will have to be made to translate between the two syntaxes if we choose to implement this feature.

maxkadel avatar Oct 15 '25 17:10 maxkadel

I guess only to show up if advanced search is turned on?

The advanced search and regular search do use different search syntax, so care will have to be made to translate between the two syntaxes if we choose to implement this feature.

Oh good catch, and that might be why the feature did not make it into core when advanced search was moved into core -- in the original plugin implementation, the advanced_search gem also made advanced search syntax available in the regular search form, for consistency!

That feature was (intentionally?) not brought in when functionality was imported into core, so that may be why the edit search button was dropped too? Not sure.

jrochkind avatar Oct 15 '25 17:10 jrochkind

@jrochkind - Yes, when I thought about it more I remembered how painful it can be to try to go back and forth between the two syntaxes, so I think this may not be something we want to implement, but I said I would make the ticket, so here it is!

maxkadel avatar Oct 17 '25 08:10 maxkadel

@maxkadel thanks for context!

I wonder if it means there could be interest in moving the "advanced" syntax to the main search too, which is one thing the old plugin did. Although implementation choices in implementing in core gem may make that infeasible, not sure.

jrochkind avatar Oct 20 '25 13:10 jrochkind