date:, before:, and after: know to use the Asset.capturedAtLocal column.
When is searching the When tag, you’re actually hitting the fulltext index on tag names.
I could special-case “when:” search terms and normalize them to be date: terms, which would prevent the weirdness you’re seeing. I’ll try that out now.
This doesn’t work because When tag paths are not zero-padded, and I don’t do any search path normalization in that endpoint.
This would only work if you’ve changed your tagYMD setting to be ymd.
I recategorized this topic as a bug, and implemented the following in the query normalizer:
If a query term’s filter matches “when” case-insensitively, replace the filter with “date” and replace the query’s forward slashes with dashes (to make the date match ISO YYYY-MM-DD or YYYY-MM or YYYY):
export function normalizeTerm(t: Term): Term {
...
if (toS(t.ns).toLowerCase() === "when") {
return normalizeTerm({
...t,
ns: AssetTermDateNs.date,
term: t.term.replace(/\//g, "-")
})
}
...
I think the way PhotoStructure handled the queries you showed previously are clearly confusing, and the solution wasn’t hard, so I implemented it.
I hadn’t planned on doing /tag/path URL normalization, at least for now, because I expect people to be just clicking to navigate, not manually typing in URLs (URLs aren’t even visible in PhotoStructure for Desktops!).
If you want to suggest heuristics for this, feel free to open a new feature request and we can cook some up (like removing any padding zeros, perhaps)?
(note that this feature will need to get in line behind delete, albums, and sharing, though!)