<?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>500414</bug_id>
          
          <creation_ts>2025-02-19 14:34:35 +0000</creation_ts>
          <short_desc>Supporting NOT in queries in addition to AND and OR</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>6.10.0</version>
          <rep_platform>Debian testing</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>424165</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>wishlist</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter>pat_h</reporter>
          <assigned_to>baloo-bugs-null</assigned_to>
          <cc>john</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>2400104</commentid>
    <comment_count>0</comment_count>
    <who name="">pat_h</who>
    <bug_when>2025-02-19 14:34:35 +0000</bug_when>
    <thetext>You can create all possible queries with the three basic operators AND, OR and NOT if I remember correctly. However, NOT does not seem to be implemented. It&apos;s neither in advancedqueryparser.cpp nor mentioned in baloosearch6.

Using the Shell (here: Fish) you can use the following very crude workaround on the command line:
comm -23 (baloosearch6 &quot;tag:TAG1&quot; 2&gt;/dev/null | sort | psub) (baloosearch6 &quot;tag:TAG2&quot; 2&gt;/dev/null | sort | psub)

But this is obviously not available in, e.g., Dolphin&apos;s GUI.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2400664</commentid>
    <comment_count>1</comment_count>
    <who name="">tagwerk19</who>
    <bug_when>2025-02-20 13:30:33 +0000</bug_when>
    <thetext>(In reply to pat_h from comment #0)
&gt; ... NOT does not seem to be implemented ...
That&apos;s a big ask!

&gt; Using the Shell (here: Fish) you can use the following very crude workaround
&gt; on the command line:
&gt; comm -23 (baloosearch6 &quot;tag:TAG1&quot; 2&gt;/dev/null | sort | psub) (baloosearch6
&gt; &quot;tag:TAG2&quot; 2&gt;/dev/null | sort | psub)
That works, it is effectively a &quot;AND NOT&quot; as in &quot;tag:TAG1 AND NOT tag:TAG2&quot;

You would also have to deal with &quot;NOT tag:TAG1&quot; and maybe even &quot;OR NOT tag:TAG1&quot;, there&apos;s be a lot of work.


&gt; 
&gt; But this is obviously not available in, e.g., Dolphin&apos;s GUI.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2407454</commentid>
    <comment_count>2</comment_count>
    <who name="John Kizer">john</who>
    <bug_when>2025-03-14 04:23:20 +0000</bug_when>
    <thetext>Hi - merging this in with the existing report on baloo supporting negation in queries, thanks!

*** This bug has been marked as a duplicate of bug 424165 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>