Similarities tool does not restrict the search?

I am writing this to discuss a specific behavior in the Similarity Search (Fuzzy/Duplicates) tool before filing a formal bug report on Bugzilla. I want to ensure this isn’t an intended behavior or a configuration misunderstanding on my part.

My Environment:

  • OS: Ubuntu Studio 24.04 LTS
  • digiKam Version: 8.8 (AppImage)
  • Collection Size: ~30,000 items

The Scenario: I am trying to perform a similarity search within a very specific scope. My goal is to find similar images only inside a single sub-folder (Album), comparing images against themselves within that folder.

My Configuration:

  • I open the Maintenance → Find Duplicates / Similarity tool.
  • I add only one specific Album to the search list (containing < 100 images).
  • I set this same Album as the Reference Folder.
  • I strictly check the option to “Search only in reference album” (restrict search scope).

The Observation (The Issue): Even with the restriction explicitly enabled, digiKam proceeds to initialize a scan/fingerprint check that appears to traverse my entire collection (30k+ items) rather than limiting the operation to the selected Reference Album (< 100 items).

Instead of a quick operation on a small dataset, the process triggers a full-collection check, resulting in thousands of unnecessary impressions and a significant delay.

The Question: Is strictly limiting the search scope to the Reference Album supposed to prevent the engine from reading/scanning the rest of the collection? Logically, if I restrict the search to “Reference Album Only”, the engine should ignore the other 29,900 items in the database.

Has anyone else experienced this “scope leakage”? If this is confirmed as an issue where the restriction flag is ignored during the scanning phase, I will proceed to file a bug report.

I’ve recorded a video demonstrating that situation: https://youtu.be/s2eTvriuz8E

Thank you for your insights.

Phenry Photographer & Designer

UPDATE / CORRECTION:

After further testing and cross-referencing to isolate the behavior, I noticed a crucial distinction that I missed in my initial post.

The issue specifically occurs when using the Left Sidebar → Similarity Tab.

I compared both methods:

  1. Maintenance → Find Duplicates: This tool correctly respects the folder restriction. It scans only the target album as expected.

  2. Left Sidebar (Main Window) → Similarity Tab: This is where the restriction is ignored. Even with “Restrict to reference album” checked, it scans the entire collection.

It seems the parameter to limit the scope is not being correctly passed or honored when the engine is triggered from the Left Sidebar interface, whereas the Maintenance tool handles it correctly.

Please consider this distinction for reproduction purposes. The video attached previously depicts the behavior in the Left Sidebar.