Bug 318442 - Searching in a non-indexed folder finds nothing
Summary: Searching in a non-indexed folder finds nothing
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 2.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Vishesh Handa
URL:
Keywords:
: 271600 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-04-16 11:55 UTC by Kai Uwe Broulik
Modified: 2013-05-29 14:49 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Uwe Broulik 2013-04-16 11:55:33 UTC
I just turned on Nepomuk again and now when using Dolphin's search (Ctrl+F) in a non-indexed location it finds nothing. It should use filenamesearch:/ instead.

Reproducible: Always

Steps to Reproduce:
1. Turn on Nepomuk and File Indexer
2. Navigate to a non-indexed location such as ~/.kde/share/config
3. Enter a search term such as plasma (to find eg. plasma-desktop-appletrc)
Actual Results:  
No files are found at all

Expected Results:  
It uses filenamesearch and finds the files :)
Comment 1 Kai Uwe Broulik 2013-04-16 12:13:25 UTC
Same for network locations. You cannot make it index smb:/ or ftp:/ shares, so there it should also always do a filenamesearch.
Comment 2 Kai Uwe Broulik 2013-04-16 12:36:20 UTC
Ok, sorry for the noise.
I tried again and searching network locations infact uses filenamesearch and works.
Same for excluded locations.

The isPathIndexed() function does not, however, check if the folder is a dot-folder (which .kde is) and so assumes this directory is indexed (.kde is a subdirectory of $HOME), although - I think - dot folders are only indexed if the user chose so, not automatically.
Comment 3 Frank Reininghaus 2013-04-19 16:07:22 UTC
Thanks for the report.

(In reply to comment #2)
> The isPathIndexed() function does not, however, check if the folder is a
> dot-folder (which .kde is) and so assumes this directory is indexed (.kde is
> a subdirectory of $HOME), although - I think - dot folders are only indexed
> if the user chose so, not automatically.

Hm, that means that we should actually not only read the "folders" from nepomukstrigirc and remove the "exclude folders" from the resulting tree, but also the hidden folders. But the latter only if indexing is disabled for hidden folders...

I think that reinventing the function that Nepomuk itself uses to decide which folders are indexed is not a good idea - it obviously went wrong ;-)

@Vishesh: would it be possible to add some public API to Nepomuk to find out if a folder is indexed or not?
Comment 4 Frank Reininghaus 2013-04-19 16:08:04 UTC
Oops, I should actually add Vishesh to CC if I ask him something ;-)
Comment 5 Vishesh Handa 2013-04-23 11:56:13 UTC
> @Vishesh: would it be possible to add some public API to Nepomuk to find out
> if a folder is indexed or not?

Yeah. It's actually quite simple. I'm just not sure where to add it.
Comment 6 Frank Reininghaus 2013-05-12 09:06:37 UTC
*** Bug 271600 has been marked as a duplicate of this bug. ***
Comment 7 Kai Uwe Broulik 2013-05-16 19:14:18 UTC
@Vishesh: Is that stuff for 4.11? :-)
Comment 8 Vishesh Handa 2013-05-28 15:04:24 UTC
uhh. Yeah. I think I'm just going to hack this in dolphin.
Comment 9 Vishesh Handa 2013-05-29 14:49:50 UTC
Git commit 85ea7bda39eaeed7024fbd9c3bc5513de720e8a1 by Vishesh Handa.
Committed on 28/05/2013 at 18:33.
Pushed by vhanda into branch 'master'.

Dolphin Search: Do not use Nepomuk for hidden folders

Nepomuk does not index hidden folders
REVIEW: 110697
FIXED-IN: 4.11.0

M  +25   -0    dolphin/src/search/dolphinsearchinformation.cpp

http://commits.kde.org/kde-baseapps/85ea7bda39eaeed7024fbd9c3bc5513de720e8a1