Bug 263724 - file search does not find folders
Summary: file search does not find folders
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Unclassified
Component: search (show other bugs)
Version: 16.12.2
Platform: openSUSE RPMs Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-20 11:05 UTC by S. Burmeister
Modified: 2011-01-20 18:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description S. Burmeister 2011-01-20 11:05:07 UTC
Version:           unspecified (using KDE 4.5.95) 
OS:                Linux

If I open my home folder I have a folder named "Ablage". Pressing CTRL+F opens the search tab and I set it to search for filename "ablage" "from here" yet it does not find anything.

Reproducible: Always
Comment 1 Peter Penz 2011-01-20 11:16:29 UTC
If you've enabled Nepomuk/Strigi for this folder it is probably a duplicate of bug 262274 and has been fixed in the meantime. Did you enable Nepomuk/Strigi?
Comment 2 S. Burmeister 2011-01-20 11:24:57 UTC
I do not think it is that bug because it does find some docs that are in sub-folders but it does not find the folder i.e. /home/username/Ablage is not displayed as result if I start a search for "ablage"  no matter whether I use "from here" or "everywhere".
Comment 3 Peter Penz 2011-01-20 11:36:14 UTC
We'd please need the information whether you're folder where "Ablage" is located is indexed by Nepomuk/Strigi or not, otherwise we cannot assign it to the proper component. Thanks.
Comment 4 S. Burmeister 2011-01-20 11:42:32 UTC
yes, home/username is indexed as well as home/username/Ablage
Comment 5 S. Burmeister 2011-01-20 11:43:11 UTC
oh, and of course if one disables nepomuk the folder is found.
Comment 6 Peter Penz 2011-01-20 12:59:12 UTC
@Sven: Thanks for the update!

@Sebastian: Is there a way to find out whether a file has been indexed already by Strigi/Nepomuk? My guess is that in the scope of this bug-report the file is not in the index (I had similar issues recently because of an inconsistent state of kdesupport/kdelibs/kdebase).
Comment 7 S. Burmeister 2011-01-20 13:29:46 UTC
(In reply to comment #6)
> @Sebastian: Is there a way to find out whether a file has been indexed already
> by Strigi/Nepomuk? My guess is that in the scope of this bug-report the file is
> not in the index (I had similar issues recently because of an inconsistent
> state of kdesupport/kdelibs/kdebase).

And by file you also mean folder, right? :) I'm pretty sure it was indexed already since files from within that folder are found.

What I mean is that if there is a file ablage.txt in /home/username/ablage and I search for ablage the result should include:

item 1: ablage
item 2: ablage.txt

as the same search does when executed with nepomuk disabled.
Comment 8 Sebastian Trueg 2011-01-20 13:37:37 UTC
Simple: Dolpin only queries files. If you want it to query folders, too one has to change dolphinsearchbox.cpp:378.
The world is not ready for non-folder results yet. ;)
Comment 9 S. Burmeister 2011-01-20 13:45:19 UTC
So with nepomuk enabled dolphin in 4.6 lacks the feature of finding folders when one searches for "filename".

Doing exactly the same search (as everything within dolphin is the same from a user's point of view) but with nepomuk enabled does find folders.

Does this not sound like a basic feature which has been around for ages?
Comment 10 S. Burmeister 2011-01-20 13:47:07 UTC
Sorry, I meant: 

Doing exactly the same search (as everything within dolphin is the same from a
user's point of view) but with nepomuk _disabled_ does find folders.
Comment 11 Peter Penz 2011-01-20 14:57:21 UTC
OK, then I'll change line 378 from DolphinSearchBox to fileQuery.setFileMode(Nepomuk::Query::FileQuery:: QueryFilesAndFolders);
if there are no objections (-> it is consistent with the non-indexed searching).

I'm not sure whether the tagging for 4.6.0 has been done already, it might be possible that the fix has to wait until 4.6.1 though...
Comment 12 Peter Penz 2011-01-20 17:56:44 UTC
SVN commit 1215986 by ppenz:

Stay consistent with the non-indexed searching and also return folders as search-result when searching in indexed folders.

BUG: 263724


 M  +1 -1      dolphinsearchbox.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1215986
Comment 13 Peter Penz 2011-01-20 17:57:09 UTC
SVN commit 1215987 by ppenz:

Stay consistent with the non-indexed searching and also return folders as search-result when searching in indexed folders.

CCBUG: 263724


 M  +1 -1      dolphinsearchbox.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1215987
Comment 14 Peter Penz 2011-01-20 18:00:27 UTC
As far as I could see, 4.6.0 has not been tagged yet -> the fix should be ready for 4.6.0 :-)
Comment 15 S. Burmeister 2011-01-20 18:06:00 UTC
Good news! Thanks for the quick fix.