What's wrong
The README's verb table says Search does "Keyword search across stored descriptions and paths" (README.md:65). The implementation only checks the description and each known path's file name (Search.cs:49):
|| kvp.Value.KnownPaths.Any(p => p.FileName.Contains(options.Query, StringComparison.OrdinalIgnoreCase))
Repro
- Store an entry with
Description = "a cat on a sofa" and KnownPaths = ["/photos/vacation/img1.jpg"], via Scan or Import.
- Run
ImageDescriber Search -q vacation.
Actual output: Search results for "vacation": 0 match(es). Expected: 1 match.
SuggestedFileName, which the model generates and Search prints for each result, isn't searched either.
Why it matters
Folder names (trip, year, event, person) are usually the only organisation a photo library has. Searching by them is the obvious query, and it silently returns nothing, so users conclude the images aren't in the database.
Suggested fix / acceptance criteria
- Match the query against the full path (
p.WeakString / p.ToString()) rather than only p.FileName. Also match SuggestedFileName.
- Add a test: an entry whose only mention of the query is in a parent directory name is returned.
- If filename-only matching is intentional, change the README to say "descriptions and file names" instead.
What's wrong
The README's verb table says
Searchdoes "Keyword search across stored descriptions and paths" (README.md:65). The implementation only checks the description and each known path's file name (Search.cs:49):Repro
Description = "a cat on a sofa"andKnownPaths = ["/photos/vacation/img1.jpg"], via Scan or Import.ImageDescriber Search -q vacation.Actual output:
Search results for "vacation": 0 match(es). Expected: 1 match.SuggestedFileName, which the model generates and Search prints for each result, isn't searched either.Why it matters
Folder names (trip, year, event, person) are usually the only organisation a photo library has. Searching by them is the obvious query, and it silently returns nothing, so users conclude the images aren't in the database.
Suggested fix / acceptance criteria
p.WeakString/p.ToString()) rather than onlyp.FileName. Also matchSuggestedFileName.