statamic / ideas

💡Discussions on ideas and feature requests for Statamic
https://statamic.dev
31 stars 1 forks source link

Filter for assets search in the controlpanel #939

Open Alpenverein opened 1 year ago

Alpenverein commented 1 year ago

I think it would be great to have the same filter options in the assets search like there are in the collections. We defined a quite detailed assets blueprint, with photographer, copyright, legal-information and so on... My editors would love to search exactly for all images which are free to use, or all images of a specific photographer...

(What I mean is the dialog dialog in the screenshot which ist missing for assets) Bildschirm­foto 2023-01-19 um 09 08 57

Alpenverein commented 1 month ago

I can not believe nobody is interested in a better searching experience for assets. Its possible to create own blueprints for images, pdfs and other assets but it is nocht possible to search for these fields/values. In general I like the simplicity of the statamic asset management, but I think its really lacking the powerful search and filter possibilities which are present for all other collections. What is the difference between Collections and Assets? Is there a technical reason for that?

duncanmcclean commented 1 month ago

What is the difference between Collections and Assets? Is there a technical reason for that?

They're very different under the hood. Collections have entries, with blueprint fields indexed in the Stache, where as Assets have metadata which is stored as YAML files alongside the assets.

You're more than welcome to open a PR for this if this is something you want to see implemented.

jasonvarga commented 1 month ago

It's really just the UI thats missing filters on assets. You can do everything necessary in the query builder already.

Alpenverein commented 1 month ago

What is the difference between Collections and Assets? Is there a technical reason for that?

They're very different under the hood. Collections have entries, with blueprint fields indexed in the Stache, where as Assets have metadata which is stored as YAML files alongside the assets.

You're more than welcome to open a PR for this if this is something you want to see implemented.

Ok, yes it might be different under the hood, but why? Its just my users perspective, not the developers one, but this feels quite similar. Assets do also have blueprints with fields like collection entries do. The data from the fields are stored in yaml format like the data of collection entries do (ok, the yaml is inside markdown files). The metadata of the assets can be configured to be searched inside the config/search.php like the collections entries, and the configured fields get indexed.

My colleagues at the editors desk would love to be able to search exactly for the terms they added to the assets in the controlpanel before. If for example the photographers name was John Doe, they want only to find images taken by John Doe (metadata field byline=John Doe) not the ones he is on the image (and therewhy his name is in the caption). They are only abel to do a fulltext search on all metadata fields but not on a specific one.

duncanmcclean commented 1 month ago

It's perfectly do-able, there just hasn't been enough people wanting it for us to build it. You're welcome to open a pull request if you want to see the feature added.