-
Notifications
You must be signed in to change notification settings - Fork 192
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
Directory is not shown in the search results #304
Comments
Yeah I kinda know about the issue: pigallery2/src/backend/model/database/sql/SearchManager.ts Lines 183 to 185 in e5cd8b6
Although the search work, but it only returns photos within that directory and the |
@bpatrik, the example of @bruce30262 wouldn't show any photos inside the folder, even if it was not empty, as this example demonstrates.
And here:
So, to answer my own question, yes, if I also wonder if it's a good idea to show only the folder as @bruce30262 requested, instead to show the folder content as it's the case how PiGallery2 works today. Why do you want first to click the folder instead to see immediately its contents? |
So first of all, I use pigallery2 to host my comics and CG collections, which is a little different from hosting photos. Those comics/CG are all stored in different folders ( all in the format of
The whole collection contains hundreds of sub-folder, and that's why the directory searching feature is important to me, since it helps me get to the folder I want to access. A use case will be :
To me it's quite the contrary : It is important to NOT showing the pictures altogether in a folder that contains subfolders because in my case it might show all the comics at once, and I don't want that. Right now I'm using an older version of pigallery2 ( my fork and my docker image ) which will show the directory in the search results. It would be nice to upgrade to the latest version, however unless it brings back the directory searching or else I guess I'm going to stick with the old version for a little longer :P |
@bruce30262, thanks for the description of your use case. I now understand why you need this feature. |
Yes the old version does show the directory in the search results ( I'm using the version at 7f321a3 ). I was trying to upgrade to the latest version, however decided not to because I found the directory searching is removed in the latest version.
Unfortunately I'm not familiar with the code ( also not familiar with web app developing ) so I guess it's up to @bpatrik to decide when to bring back the feature. I'm fine with the old version though, since it suits my need and works fine for now. Again it would be nice to upgrade to the latest version, but I'm also OK with staying in the version I'm using right now :) |
I might have found a workaround for such a use case but maybe you have others.
Would this help you? |
@kagahd thanks for providing this workaround ! However although it does work, it's still kinda inconvenient and not as intuitive as the old version, so I think I'm still gonna use the old one. |
Creates a settings that can enable and disable directories in search result
Added this functionality with a config switch. By default does not search among folders. Also updated the docs to explain how one can use the search: http://bpatrik.github.io/pigallery2/ |
+1: I can also suggest to tag (keyword) your photos. You can use like exiftool to batch keyword them, but in Windows it is also simple to to select all and add keywords to all of them at once. |
I tested the newly added functionality |
Describe the bug
pigallery2 is not showing the directory in the searching result, an example can be seen in the following URL:
https://pigallery2.herokuapp.com/search/%7B%22type%22:102,%22text%22:%22emptydirectory%22,%22matchType%22:1%7D
You can see that while searching for "emptydirectory", the result didn't show the directory we want to search.
Expected behavior: showing the directory we want to search and allow us to click in and browse the pictures inside the directory.
Photo/video (optional) that causes the bug
N/A
Screenshots
Environment (please complete the following information):
Used app version:
The text was updated successfully, but these errors were encountered: