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

[Feature Request] Complex Selection Screen #1276

Open
risalt opened this issue Jan 10, 2025 · 11 comments
Open

[Feature Request] Complex Selection Screen #1276

risalt opened this issue Jan 10, 2025 · 11 comments

Comments

@risalt
Copy link

risalt commented Jan 10, 2025

Hi,
Although the full text search is very useful, for big collections it is interesting to search items fulfilling specific criteria. Ideally one should be able to search items based on a dynamic set of fields (each field any of the attributes/datums/tags of any item).
Thanks!

@PerpSearch
Copy link

This would be a very useful feature for me. The search capabilities the program has right now are very impressive, but a complex field specific search is atop of my wish list right next to data export.

@benjaminjonard
Copy link
Owner

Hi, could you give me some examples of searches you'd like to do ?

@PerpSearch
Copy link

PerpSearch commented Jan 15, 2025 via email

@PerpSearch
Copy link

It didn't look like that image came through

2025-01-14_190609

@benjaminjonard
Copy link
Owner

I'm considering multiple ways to implement this. All have their advantages and drawbacks :

  • Using a specific syntax like tag=Child AND (data:Mat Shape=Oval OR data:Pose=Seated)
    It would be relatively easy to implement as there is no new interface to develop. However it is not user-friendly, users will need to learn that syntax.

  • Adding checkbox filters on the left like Amazon does. I personally don't like this one because it would work great on small collections but not on larger ones with a lot of different data. It would also not be possible to have complex queries with 'AND' and 'OR' conditions.

  • Adding a new "Advanced search page" with some kind of query builder like this :

Screenshot from 2025-01-15 13-48-31

This would be by far the most powerful way to do it, but quite complex to implement and also maybe to use. Ideally we could also save searches in the database with a name so we could easily reuse them later.

@risalt
Copy link
Author

risalt commented Jan 15, 2025

Thanks Charley for the example!

Benjamin, I was doing some homework on the topic, I have seen that there are bundles that may help in this, Form Filter Bundle looks good for instance. I was also thinking about the user interface, below you have a very complex/aspirational solution, but simpler things would also be an improvement compared to the current situation.

search_prototype

The idea behind the prototype dialog is that it allows adding conditions, each condition has:

  • A name: which is the name of the datum to which the condition applies.
  • A type: the type of the datum.
  • A logical operator: for numeric/date types: =, >=, <=, <, <>; for text-based types: Contains, Does not contain, Equal, Different; for checkboxes: Set, Not set; for multimedia fields: Exists/Does not exist.
  • A value: The value of the field. Not relevant for checkboxes or multimedia fields.

Thanks!

Robert.

@risalt
Copy link
Author

risalt commented Jan 15, 2025

Oh, I see we have written at the same time 😲
I think your third option is quite aligned with my proposal above, and I do agree that it's quite complex. Your first option would also work for me, as I'm used to databases and SQL, but maybe has a steeper learning curve. Maybe with a lateral selector to choose fields and operations (like phpMyAdmin does) it would be fine and probably still easier than the full dialog.

@PerpSearch
Copy link

PerpSearch commented Jan 15, 2025 via email

@benjaminjonard
Copy link
Owner

A first version of this new search is available in 1.6.3 (the docker image should be available in around 30 minutes)

It includes :

  • Search in item name
  • Search in item data
  • Possibility to have multiple filters
  • AND and OR conditions
  • Operators : =,<, <=, >, >=, contains
  • Possibility to save searches in database

I'll publish some improvements in the next release:

  • Filter on tags
  • Filter on collections
  • Maybe some other operators like empty, exists...

Limitations (for now)

  • The search cannot be shared with other users
  • Can't search in price fields

This is kind of a draft version so feedback is welcome 🙂

@PerpSearch
Copy link

I have 1.6.3 up and running. No surprises which is always a good thing. I have yet to be able to identify any changes between 1.6.2 and 1.6.3 as yet, but I keep looking around.

Thanks for all your hard work.
C

@risalt
Copy link
Author

risalt commented Jan 26, 2025

Moved to new item #1289

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants