Bug 319402 - Problem with nepomuksearch:/ OR and AND, don't return results in Dolphin / Konqueror / kioclient ls command line
Summary: Problem with nepomuksearch:/ OR and AND, don't return results in Dolphin / Ko...
Status: RESOLVED FIXED
Alias: None
Product: nepomuk
Classification: Unmaintained
Component: kioslave - nepomuksearch (show other bugs)
Version: 4.10.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Nepomuk Bugs Coordination
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-06 07:53 UTC by Aristide
Modified: 2013-08-29 18:41 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aristide 2013-05-06 07:53:55 UTC
When I type nepomuksearch:/mimetype:image, or, nepomuksearch:/mimetype:pdf its work. Dolphin display all indexed pictures on first URL and all indexed pdf on second URL. 

But when I try to type : « nepomuksearch:/mimetype:image OR mimetype:pdf » I don't have results in Dolphin. Its a same problem when I mix mimetype with hastag or other.

Reproducible: Always

Steps to Reproduce:
1. Open dolphin
2. CTRL+L
3. Type « nepomuksearch:/mimetype:pdf OR mimetype:image
Comment 1 Ignacio Serantes 2013-05-06 08:26:10 UTC
The query generated for  "mimetype:pdf or mimetype:jpeg" is:


select distinct ?r
where {
 {
  ?r <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#mimeType> ?v1 . FILTER(bif:contains(?v1, "'pdf'")) .
 } UNION {
  ?r <http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#contentMimeType> ?v2 . FILTER(bif:contains(?v2, "'pdf'")) .
 } UNION {
 FILTER(bif:contains(?v1, "'jpeg'")) .
 } UNION {
 FILTER(bif:contains(?v2, "'jpeg'")) .
 } .
 
}

The right query must be:

SELECT DISTINCT ?r
WHERE {
  {
    {
      ?r <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#mimeType> ?v1 . FILTER(bif:contains(?v1, "'pdf'")) .
    } UNION {
      ?r <http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#contentMimeType> ?v2 . FILTER(bif:contains(?v2, "'pdf'")) .
    }
  } UNION {
    {
      ?r <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#mimeType> ?v1 . FILTER(bif:contains(?v1, "'jpeg'")) .
    } UNION {
      ?r <http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#contentMimeType> ?v2 . FILTER(bif:contains(?v2, "'jpeg'")) .
    }
  } .
 
}
Comment 2 Aristide 2013-05-06 20:03:59 UTC
Its a same problem with AND too
Comment 3 Vishesh Handa 2013-08-29 18:41:19 UTC
Git commit aa98a806fda3eab7445e95e4de46452ffed437a9 by Vishesh Handa.
Committed on 29/08/2013 at 16:03.
Pushed by vhanda into branch 'KDE/4.11'.

QueryLib: Remove optimizations on group terms

This isn't a proper fix, but more like a temporary patch, which I should
find a proper way to fix in the future.
REVIEW: 111496

M  +3    -3    libnepomukcore/query/querybuilderdata_p.h

http://commits.kde.org/nepomuk-core/aa98a806fda3eab7445e95e4de46452ffed437a9