GNOME Bugzilla – Bug 109016
Searches should match directories too
Last modified: 2004-12-22 21:47:04 UTC
Sometimes the images in my directories have names that aren't very well searchable (like img_1234.jpg), but the directories have informative names. Searching for filename should match directory names too.
you can add keywords to folders now.
That's not what I'd intented with this big, so I'll reopen it and elaborate on what I meant, and then you can decide if you want to fix it or not. :) Suppose you have a directory tree like this: images/ vacations/ texas_2003/ img_001.jpg img_002.jpg friends/ eve/ img_001.jpg If my cwd is images/ and I want to search for images about my texas vacation, I'd search for "texas". However, since none of the images are actually descriptively named, and searches don't match directory names, my search will turn up empty. So I think that the search text should be matched against directory names as well as file names.
so you can add the keyword "texas" to the texas_2003 folder and search for the "texas" category.
Keywords are definitely useful for one-to-many relations, so keywords tend to be more generic. "Vacation" would indeed be a good keyword. "Texas" may not be, as it's more specific, and I wouldn't really use it anywhere except for that directory. I have about 2 dozen directories that fall under this criteria, so really I'd have to have 25 single-use keywords. I'd rather avoid cluttering my keywords list that much if I can. :) As far as a user's expectation is concerned, searching is very much a "do what I'm thinking" operation. I'd argue that matching searches against directory names as well as file names is much more intuitive than not.
Another thing to add: It's a terribly common thing for users to dump files off their digital cameras (named IMG_*, or DC*, or whatever) into a directory, and name the directory something descriptive, like "Trip to Hawaii 2002" or whatever. It's not unreasonable to expect users with digital cameras to have dozens or hundreds of directories like this. By not searching directory names and requiring keywords to be assigned to those directories, the barrier to entry for gthumb for these users is quite high. It means that if they want to start using gthumb to the way they want ("I want to find my hawaii images and view them") they have to do quite a bit of initial setup: creating new keywords and assigning them to each of the dozens or hundreds of directories. I don't believe matching directory names and file names is technically inelegant, and I'm confident it is the more intuitive behavior. It would mean that people with very large, established collections can begin using gthumb for searching their collections without having to spend a day categorizing them. Just another angle to consider.
ok, fixed now :)
Bravo. :) Many thanks.
It might be better if gthumb matched the behaviour of gnome-search-tool in this respect. With gnome-search-tool (using gnome 2.5), it will search the name criteria against the name of the folder, rather than the full pathname of the file. So if I search for "texas", it will match: Name Folder -------- ------------------------ texas_2003 /home/tack/images/vacations and give me the option to open it in Nautilus, rather than what gthumb does, which is match each file underneath that directory. The "match folder name only" behaviour like gnome-search-tool is what I would have expected in gthumb, although because it seems the Search Results virtual category isn't hierarchical, this would be difficult to represent matched folders in the search results catalog. I really think this "match folders" behaviour is important, but it doesn't smoothly integrate with how gthumb currently does searching. I propose changing search behaviour so that it works this way: - Search criteria matches individual files or directory names, but pathnames of files aren't searched. - Rename "Filename" header in the results list to "Name" to match gnome-search-tool. - Use icons in the Name column also like gnome-search-tool. For matched folders, use a folder icon. For matched images, use an image icon. - Add a button "View Folder" to the search results dialog, which is active when a folder is selected in the search results list. Clicking this button moves gthumb to the folder, but doesn't close the search results dialog. (It's modeless, so we can still use it.) - Double clicking an image in the search list causes gthumb to move to the folder of that image, and view the image in the preview pane. - Rename "View" button to "View as Catalog" to make it a little clearer that this creates a virtual folder (catalog) out of the search results. - Here's where things get hairy: how to handle the matched folders when we View as Catalog. One option would be simply to ignore matched folders in the search results, and only add matched images. Another option would be to add all images directly under the matched folders (i.e. not recursively) to the Search Results catalog. I favor the latter, but I'm not especially happy with either.