Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parsing raw query for modifiers #133

Open
1 task
sarayourfriend opened this issue Dec 14, 2021 · 4 comments
Open
1 task

Add parsing raw query for modifiers #133

sarayourfriend opened this issue Dec 14, 2021 · 4 comments
Labels
🕹 aspect: interface Concerns end-users' experience with the software 🌟 goal: addition Addition of new feature 🟩 priority: low Low priority and doesn't need to be rushed 🧱 stack: frontend Related to the Nuxt frontend

Comments

@sarayourfriend
Copy link
Collaborator

Problem

Currently from the frontend if you want to search for galah images that are cc0 you'd need to execute a search for galah first, then use the UI to add the cc0 filter.

For power-users this adds an unnecessary extra step.

Description

We could add a feature like most search engines have and allow the query itself to supply extra parameters of the search. For example, we could add a (not well-named) license option that could work like this:

galah license:cc0,pdm

This would automatically select the cc0 and pdm filters. Similarly:

galah providers:flickr

galah file-type:jpeg,png provider:flickr,smithsonian license:cc0,pdm

And so on, would also work.

I think it'd be best to implement this on the API side rather than directly in the frontend so that this feature would be automatically available to any frontend that hooks up to the API without having to reimplement the parsing.

Additional context

This feature would require an implementation plan if we decide to do it.

Implementation

  • 🙋 I would be interested in implementing this feature.
@zackkrida
Copy link
Member

Cool idea!

@dhruvkb
Copy link
Member

dhruvkb commented Jan 1, 2022

Great idea, I have some thoughts on how this could be implemented but it needs work in two places (so maybe we could move it to the WordPress/openverse repo).

API:
The API backend already has an implementation to use filters (like license) passed as query params, so without much effort, it can be tweaked to populate and extract those filters from the search term q field.

Ref:

Frontend:

The frontend might also need some work to parse queries containing advanced filters and populate the UI based on those. For example, when searching for galah license:cc0,pdm, the search box must be populated to galah and the checkboxes for cc0 and pdm in the license filters must be checked.

@sarayourfriend
Copy link
Collaborator Author

@dhruvkb That's such a good point, this is basically just moving the query params into the raw query, the format is almost exactly the same if you replace = with : to match how most search engines do it. Let's do move this to the openverse repo like you suggested 👍

@sarayourfriend sarayourfriend transferred this issue from WordPress/openverse-api Jan 3, 2022
@sarayourfriend sarayourfriend added 🌟 goal: addition Addition of new feature 🕹 aspect: interface Concerns end-users' experience with the software 🟩 priority: low Low priority and doesn't need to be rushed labels Jan 3, 2022
@obulat obulat added the 🧱 stack: frontend Related to the Nuxt frontend label Feb 22, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Openverse Backlog Feb 23, 2023
dhruvkb pushed a commit that referenced this issue Apr 14, 2023
* Simplify catalog folder structure

Signed-off-by: Olga Bulat <[email protected]>

* Move pyspark- requirements to archive

Signed-off-by: Olga Bulat <[email protected]>

* Simplify `common` module imports

Signed-off-by: Olga Bulat <[email protected]>

* Fix import paths

Signed-off-by: Olga Bulat <[email protected]>

* Remove `.github/workflows-disabled` folder

* Move jamendo and stocksnap scripts to the correct folders

Co-authored-by: Krystle Salazar <[email protected]>
@sarayourfriend
Copy link
Collaborator Author

Strongly related to #3328

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🕹 aspect: interface Concerns end-users' experience with the software 🌟 goal: addition Addition of new feature 🟩 priority: low Low priority and doesn't need to be rushed 🧱 stack: frontend Related to the Nuxt frontend
Projects
Status: 📋 Backlog
Development

No branches or pull requests

4 participants