<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>424165</bug_id>
          
          <creation_ts>2020-07-13 17:40:26 +0000</creation_ts>
          <short_desc>Negated terms in queries</short_desc>
          <delta_ts>2025-03-14 04:23:20 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>Frameworks and Libraries</classification>
          <product>frameworks-baloo</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CONFIRMED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>vini.ipsmaker</reporter>
          <assigned_to name="Stefan Brüns">stefan.bruens</assigned_to>
          <cc>j.straight-kde</cc>
    
    <cc>nate</cc>
    
    <cc>pat_h</cc>
    
    <cc>tagwerk19</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1943506</commentid>
    <comment_count>0</comment_count>
    <who name="">vini.ipsmaker</who>
    <bug_when>2020-07-13 17:40:26 +0000</bug_when>
    <thetext>Nepomuk&apos;s Query class allowed construction from a manually created Term object. This setup allowed one to use the negation basic logic operator. Baloo&apos;s Query dropped the possibility to feed a manually created Term object and moved Term to implementation details. However, in doing so, it also dropped support for such operator (only AND and OR are supported). Negation is a basic logic operator and should be supported.

My use case is very simple. Every time I read a document, I tag it with &quot;already-read&quot;. I want to search for every document in the tag &quot;project1&quot; that isn&apos;t tagged as &quot;already-read&quot;.

Baloo&apos;s Term class still retains the &quot;negated&quot; property. I believe one only needs to update the function Term::fromVariantMap() and it&apos;ll automatically propagate to a few upper classes and functions such as Query::fromJSON().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1943522</commentid>
    <comment_count>1</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2020-07-13 18:14:46 +0000</bug_when>
    <thetext>Sounds like you&apos;re pretty close to writing a patch for this. :) Wanna go all the way and submit one?

https://invent.kde.org/frameworks/baloo/-/merge_requests</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1943542</commentid>
    <comment_count>2</comment_count>
    <who name="Stefan Brüns">stefan.bruens</who>
    <bug_when>2020-07-13 19:02:47 +0000</bug_when>
    <thetext>Its not only the query which has to be updated, it also has to be executed. Thats the non-trivial part.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1950851</commentid>
    <comment_count>3</comment_count>
    <who name="">vini.ipsmaker</who>
    <bug_when>2020-08-14 21:55:01 +0000</bug_when>
    <thetext>&gt; Sounds like you&apos;re pretty close to writing a patch for this. :) Wanna go all the way and submit one?

I thought more about the problem and -- as Stefan Brüns pointed out -- the query processor will have to be upgraded too. Old Nepomuk would rely on OpenLink Virtuoso for query execution, so no code from old code base could be used as a reference in the new Baloo framework.

I&apos;ll just find a workaround for my use-case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2265329</commentid>
    <comment_count>4</comment_count>
    <who name="Stefan Brüns">stefan.bruens</who>
    <bug_when>2023-11-13 08:48:51 +0000</bug_when>
    <thetext>*** Bug 474994 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2407455</commentid>
    <comment_count>5</comment_count>
    <who name="John Kizer">john</who>
    <bug_when>2025-03-14 04:23:20 +0000</bug_when>
    <thetext>*** Bug 500414 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>