Bug 454978 - Search for camera maker does not yield results for certain photos
Summary: Search for camera maker does not yield results for certain photos
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Searches-Advanced (show other bugs)
Version: 7.6.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-07 13:48 UTC by José Oliver-Didier
Modified: 2022-06-07 20:35 UTC (History)
2 users (show)

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


Attachments
DebugView Log (86.17 KB, text/plain)
2022-06-07 13:49 UTC, José Oliver-Didier
Details
Metadata Sidebar (17.26 KB, image/png)
2022-06-07 16:58 UTC, José Oliver-Didier
Details
Camera Make selection options (11.84 KB, image/png)
2022-06-07 18:01 UTC, José Oliver-Didier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description José Oliver-Didier 2022-06-07 13:48:07 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Download test file attached to this bug.
2. Open Digikam, ensure test file is included in digikam album and select the "Search" left hand tab.
3. Create a new search for Camera make = "NIKON"
4. Click "Ok"

OBSERVED RESULT
- Test file does not appear in the search results

EXPECTED RESULT
- Test file should appear in the search results given that the image was taken with a "NIKON" camera.

SOFTWARE/OS VERSIONS
Windows 11

ADDITIONAL INFORMATION
- running exiftool for test image image confirms make="NIKON"
Comment 1 José Oliver-Didier 2022-06-07 13:49:38 UTC
Created attachment 149532 [details]
DebugView Log

Attaching DebugView for log, some personal info redacted.
Comment 2 caulier.gilles 2022-06-07 13:56:16 UTC
Which kind of database type did you use ? sqlite or mysql ?

Gilles Caulier
Comment 3 Maik Qualmann 2022-06-07 14:37:42 UTC
You want to search only in a specific album and in a date range from 2012-05-01 to 2022-06-06 for the make "NIKON"?

There is recently a button to start a new empty search, I think the mistake is that you only selected one album.

Maik
Comment 4 José Oliver-Didier 2022-06-07 14:47:24 UTC
(In reply to Maik Qualmann from comment #3)
> You want to search only in a specific album and in a date range from
> 2012-05-01 to 2022-06-06 for the make "NIKON"?
> 
> There is recently a button to start a new empty search, I think the mistake
> is that you only selected one album.
> 
> Maik

- I am using MariaDB 10.5
- I tried an empty search as well, and last case an album which contained such files.
- Other images taken with Nikon appeared in the search results, but not the ones taken with Coolpix cameras.
- Tried with other makes such as "Canon" and it did yield results.
- Searching with the specific model "COOLPIX AW100" and Model = "Any" also yielded results. 
- Searching Model="COOLPIX AW100" and Make "NIKON" yielded no results.
Comment 5 Maik Qualmann 2022-06-07 15:23:40 UTC
The metadata may not have been read in completely, the problem is known from Windows. Select an image that should be found in the search and see if the camera make appears in the Properties tab on the right sidebar. If not, you'll need to reload the metadata.

Maik
Comment 6 José Oliver-Didier 2022-06-07 16:58:29 UTC
Created attachment 149535 [details]
Metadata Sidebar

I checked the sidebar and the Make metadata is shown. Also I queried the imagemetadata table in the MariaDB and the Make field is also correctly populated. Oddly, it seems to only affect this camera model.
Comment 7 Maik Qualmann 2022-06-07 17:11:15 UTC
Also tested here under Windows with MariaDB and 3 sample images from the web, no problems.

Maik
Comment 8 Maik Qualmann 2022-06-07 17:23:04 UTC
Now I see the problem in the log, you search for "NIKON CORPORATION". Only "NIKON" must also be present in the list. You then have to select that as well. This is not the same for search.

Maik
Comment 9 José Oliver-Didier 2022-06-07 18:01:26 UTC
Created attachment 149537 [details]
Camera Make selection options

Interesting, but I do not see "NIKON CORPORATION" on the options list, I am only selecting "NIKON".
Comment 10 José Oliver-Didier 2022-06-07 18:24:10 UTC
Ref attached screenshot of Camera Make selection options.

I selected "NIKON" in the options list, "NIKON CORPORATION" is not in the drop-down options. However, the only shown photos are those with "NIKON CORPORATION" in the Make exif field as shown in the "ExifTool" tab. However, it is displayed as "NIKON" in the "Properties" tab. Seems that there something going on the displayed value and the value used in the search query.
Comment 11 Maik Qualmann 2022-06-07 18:26:50 UTC
Ah, now the problem is clear. We shorten the camera manufacturer names because some manufacturers have long names (Co. Ltd. etc.). For me, NIKON without CORPORATION is found first in the DB, so it works. Hmm we'll probably have to allow the full name for the list. A LIKE search wasn't really good either, I remember.

Maik
Comment 12 Maik Qualmann 2022-06-07 18:39:02 UTC
Git commit a7cd3864444f6a7eae6d8d82427a53fe436f08bb by Maik Qualmann.
Committed on 07/06/2022 at 18:38.
Pushed by mqualmann into branch 'qt5-maintenance'.

do not shorten camera make name in advanced search
FIXED-IN: 7.7.0

M  +2    -1    NEWS
M  +0    -1    core/utilities/searchwindow/searchfields.cpp

https://invent.kde.org/graphics/digikam/commit/a7cd3864444f6a7eae6d8d82427a53fe436f08bb
Comment 13 Maik Qualmann 2022-06-07 20:13:18 UTC
Git commit 4459c2b30837b6f47b985f3afba172e4949d12cc by Maik Qualmann.
Committed on 07/06/2022 at 20:12.
Pushed by mqualmann into branch 'qt5-maintenance'.

use wildcard search for the camera make

M  +3    -1    core/utilities/searchwindow/searchfields.cpp

https://invent.kde.org/graphics/digikam/commit/4459c2b30837b6f47b985f3afba172e4949d12cc
Comment 14 José Oliver-Didier 2022-06-07 20:35:41 UTC
(In reply to Maik Qualmann from comment #11)
> Ah, now the problem is clear. We shorten the camera manufacturer names
> because some manufacturers have long names (Co. Ltd. etc.). For me, NIKON
> without CORPORATION is found first in the DB, so it works. Hmm we'll
> probably have to allow the full name for the list. A LIKE search wasn't
> really good either, I remember.
> 
> Maik

The shorten/simplified name, rather that displaying inconsistent verbose values for the Camera maker does seem like a nice feature, especially for the values displayed in Digikam's "Properies" pane.  Flickr's Camera Finder comes to mind: https://www.flickr.com/cameras