The Wayback Machine - https://web.archive.org/web/20201013135042/https://github.com/k3b/APhotoManager/issues/136
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

Filter-view: logical "OR" for tags: find "... where tag=tag1 or tag=tag2 or ...." ? #136

Open
xandro0777 opened this issue Mar 13, 2019 · 2 comments

Comments

@xandro0777
Copy link

@xandro0777 xandro0777 commented Mar 13, 2019

perhaps if "," inbetween tags in the text fields means AND then " " could be used for OR, such as {{{peter,harbor,night peter,crete}}} would filter pictures with either (peter AND harbor and NIGHT) or (peter AND crete) ?

@k3b
Copy link
Owner

@k3b k3b commented Mar 14, 2019

a good idea but i donot want to change the semantic from

  • currently " " means "and" to
  • " " means "or" which destroys the saved filteres

maybe sorounding with "(..)" changes from "and" to "or". not intuiltive but backwards compatible.
any idea how to make it more intuitive?

As a workaround for you can create the filter with "and", save as album file and edit the album file with a texteditor and replace the text with "or"


if somebody wants to implement this

it should be doable without knowing how the whole app works.

just start with unit tests in

  • de.k3b.android.androFotoFinder.tagDB.TagSqlQueryParserTests for the sql part and
  • de.k3b.io.GalleryFilterParameterTest for (de-)serialisation
@k3b k3b changed the title Filter-view: logical OR tags ? Filter-view: logical "OR" for tags: find "... where tag=tag1 or tag=tag2 or ...." ? Mar 14, 2019
@xandro0777
Copy link
Author

@xandro0777 xandro0777 commented Mar 15, 2019

If the space char is already taken, could "||" work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.