GNOME Bugzilla – Bug 327787
searching in several locations only displays search results for last location
Last modified: 2012-07-20 12:26:38 UTC
Please describe the problem: With the new simple (no beagle) search interface, there is the posibility to define more than one location however results come only from the last location. Steps to reproduce: 1. 2. 3. Actual results: Expected results: Search files in all the locations defined. Does this happen every time? Other information:
Confirmed with Nautilus 2.14.3 on Ubuntu Dapper.
the issue is still there on GNOME 2.24 https://bugs.launchpad.net/nautilus/+bug/275495
Created attachment 143516 [details] [review] Fixes multi location searches in simple engine This patch fixes the problem when you've selected multiple search locations and only the last one was search. It changes the NautilusQuery api, the savedSearch file format (compatible with previous format) and updates the simple search. As I'm not a tracker nor beagle expert I'd like them to update the other engines. Please review and consider for 2.28.X.
Dear Marcus, first of all, thanks for your efforts! > This patch fixes the problem when you've selected multiple search locations and > only the last one was search. It changes the NautilusQuery api, the savedSearch > file format (compatible with previous format) and updates the simple search. To my understanding, the current search functionality uses a logical AND operation on all search criterions. Therefore, contents of different folders is mutually exclusive (omitting hardlinks). For instance, we have "file type" is "Document" AND "file name" matches "foo*" AND "location" contains "folder A". It seems to be odd to silently change "location" contains "folder A" to "location" contains "folder A" OR "location" contains "folder B" in case that you select multiple folders, without making this somehow obvious in the GUI. For instance, the GUI could look like [ Location] [A] or [B] ... [F] or [G] or [ Location] [A] or [B] ... [F] or [G] The latter has the advantage of being able to display a [-] next to each criterion. I am also not sure whether it makes sense to change <location> to <locations> because it changes the file format, such that you can not downgrade Nautilus. Appending each <location> wouldn't break anything - because if old releases just pick the last one, the file is at least considered valid.
btw. the UI change should also be used for the "file type" criterion. I think criterions referring to the same file property (location, type, ...) should always be linked with a logical OR, and this must be made obvious somehow. Maybe someone also has a good idea how multiple file name patterns can be displayed in the UI, but this would probably only be rarely used and not of major importance.
Christian, actually I think that the built in search function in nautilus is quite crappy. And that we also ship the gnome-search-tool with gnome is quite strange as well - why not focusing on one tool (and make it really good)? My proposal - Get rid of the gnome-search-tool and point to nautilus search:// instead - Remove the search entry and replace it with a filter entry instead (just filtering the current view) - Create a new search tool inside of nautilus more like the gnome-search-tool, see below In the new nautilus search tool, as you describe, make it clear whether its OR or AND like this; (all is inside the view) Name contains [foo ] [-] or [bar ][+][-] Location is in [/home/marcus] [-] or [/var/share] [-] or [/var/www] [+][-] File type is [Document] [+][-] Available options [Size \/] [Add] What do you think?
(In reply to comment #6) > Christian, actually I think that the built in search function in nautilus is > quite crappy. Why not just prevent the option to choose the second location? ie: if we have the location selected once , the next filter can only be filetype.
This is still valid in 3.1.4.
This bug is no longer present with search in master.