Bug 284553

Summary: Searching for filetypes yields extra Nepomuk items
Product: [Plasma] Active Reporter: Javier Llorente <javier>
Component: Contour activity screenAssignee: Marco Martin <notmart>
Status: RESOLVED FIXED    
Severity: normal CC: active, javier, lamarque, thomas.pfeiffer, trueg
Priority: LO    
Version: PA 2   
Target Milestone: unscheduled   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Filter matches returned by the query
Filter matches we do not want

Description Javier Llorente 2011-10-20 15:15:20 UTC
Version:           unspecified
OS:                Linux

If you search for filetypes from the application grid, you'll get unwanted results; ie: searching for "doc" yields several items with Nepomuk icons, such as "global namespace", "local namespace" and "PaginatedTextDo..." Adding any of those will result in having a resource named "undefined" with a Nepomuk icon.
Found on 2011-10-16-16-48-meego-plasma-active-testing-USB-live.iso

Reproducible: Always

Steps to Reproduce:
1. Open the application grid
2. Look for a filetype (ie: doc)
3. Observe the results


Expected Results:  
Extra Nepomuk stuff shouldn't be part of the results.
Comment 1 Javier Llorente 2011-12-01 16:28:53 UTC
Issue still reproducible on 2011-11-30-19-05-basyskom-plasma-active-devel-meego-usb-live.iso
Comment 2 Lamarque V. Souza 2012-01-04 01:03:31 UTC
Created attachment 67418 [details]
Filter matches returned by the query

The attached patch adds a "and isFile" term to the nepomuk runner's query. Of course that is not the best solution, but I could not find a common denominator between the wrong matches in my tests. We will probably have to add several terms to exclude the types we do not want or to return only the types we want.
Comment 3 Lamarque V. Souza 2012-01-04 02:33:39 UTC
Created attachment 67421 [details]
Filter matches we do not want

Add some "and not isOfType" terms to the nepomuk query to filter resources we do not want.
Comment 4 Sebastian Trueg 2012-01-04 08:01:58 UTC
(In reply to comment #3)
> Created an attachment (id=67421) [details]
> Filter matches we do not want
> 
> Add some "and not isOfType" terms to the nepomuk query to filter resources we
> do not want.

Please get rid of that propertyUrl method. It is ugly. We have namespaces which hide the URL strings for exactly that purpose: Nepomuk::Vocabulary::NIE and friends. Just include <Nepomuk/Vocabulary/NIE> and so on.

Also instead of adding a type term for files use FileQuery which is optimized for file queries.
Comment 5 Lamarque V. Souza 2012-01-04 13:29:50 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Created an attachment (id=67421) [details] [details]
> > Filter matches we do not want
> > 
> > Add some "and not isOfType" terms to the nepomuk query to filter resources we
> > do not want.
> 
> Please get rid of that propertyUrl method. It is ugly. We have namespaces which
> hide the URL strings for exactly that purpose: Nepomuk::Vocabulary::NIE and
> friends. Just include <Nepomuk/Vocabulary/NIE> and so on.

I am having difficult to understand how to use NIE. There are just functions in that namespace and none of them accept parameters. How can I get the url of the resources I am not interested in if I cannot pass any parameter?
 
> Also instead of adding a type term for files use FileQuery which is optimized
> for file queries.

I am not searching for files in my second patch. In the second patch I am creating a query passing the resources I am not interested in and retrieve everything else. There are non-file resources that are interesting for us, like bookmarks.

In my notebook nepomuksearch does not return those "extra items". I am wondering if there is something wrong somewhere else that makes those "extra items" to appear.
Comment 6 Thomas Pfeiffer 2012-12-06 20:38:28 UTC
Still reproduceable in Master, but I think it's a low prio problem.
Comment 7 Thomas Pfeiffer 2013-02-05 18:41:16 UTC
No strange Nepomuk-related stuff shown anymore, only files.