After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 327787 - searching in several locations only displays search results for last location
searching in several locations only displays search results for last location
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: File Search Interface
3.1.x
Other All
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-01-20 02:54 UTC by jsc
Modified: 2012-07-20 12:26 UTC
See Also:
GNOME target: ---
GNOME version: 3.1/3.2


Attachments
Fixes multi location searches in simple engine (6.40 KB, patch)
2009-09-20 09:15 UTC, Marcus Carlson
none Details | Review

Description jsc 2006-01-20 02:54:28 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:
Comment 1 Teppo Turtiainen 2006-09-17 19:04:45 UTC
Confirmed with Nautilus 2.14.3 on Ubuntu Dapper.
Comment 2 Sebastien Bacher 2008-09-29 10:27:56 UTC
the issue is still there on GNOME 2.24 https://bugs.launchpad.net/nautilus/+bug/275495
Comment 3 Marcus Carlson 2009-09-20 09:15:47 UTC
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.
Comment 4 Christian Neumair 2009-09-26 11:02:06 UTC
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.
Comment 5 Christian Neumair 2009-09-26 11:05:54 UTC
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.
Comment 6 Marcus Carlson 2009-09-28 16:06:10 UTC
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?
Comment 7 Vish 2010-07-11 18:12:36 UTC
(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.
Comment 8 André Klapper 2011-08-11 18:37:00 UTC
This is still valid in 3.1.4.
Comment 9 William Jon McCann 2012-07-20 12:26:38 UTC
This bug is no longer present with search in master.