Bug 284553 - Searching for filetypes yields extra Nepomuk items
Summary: Searching for filetypes yields extra Nepomuk items
Status: RESOLVED FIXED
Alias: None
Product: Active
Classification: Plasma
Component: Contour activity screen (show other bugs)
Version: PA 2
Platform: Unlisted Binaries Linux
: LO normal
Target Milestone: unscheduled
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-20 15:15 UTC by Javier Llorente
Modified: 2013-02-05 18:41 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Filter matches returned by the query (5.15 KB, patch)
2012-01-04 01:03 UTC, Lamarque V. Souza
Details
Filter matches we do not want (5.87 KB, patch)
2012-01-04 02:33 UTC, Lamarque V. Souza
Details

Note You need to log in before you can comment on or make changes to this bug.
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.