If PS supports date range queries, that would probably be a query I’d like to see. I think you used after and before for that? Then this would also give you an opportunity to show combinations of search terms.
An example would be kw:balloon or keyword:balloon, but I’d need to fetch the top-N keywords from the library to give an example that isn’t empty.
who:michael, but again, I’d need to fetch the top-N Who tags from the library to give an example that isn’t empty.
This won’t be in this iteration: I think we discussed having a custom set of indexed exif tags in a prior topic, right? Is there a feature tracking that idea, specifically?
It’s probably a good idea to have an example for every search type (who, kw, date, etc.). Short of that, the search page should at least list all of the possible search types.
Ok, I added a recently-updated item, one with a before and after, a prior search history, and an order-by toggle (that toggles between most-recent photos, least-recent photos, and most-recently-updated)
In the paragraph “What’s a search term” the quoting is a bit misleading: You included the punctuation inside the quotes. I’d suggest to drop the quotes here as you did in the later paragraphs.
If you’d like to support this, it might make sense to store year, month, day as separate fields (additionally). However, I have no experience how well SQLite supports arbitrary combinations of fields in its queries (bitmap indices maybe)?
Just as fodder for thought, if SQLite performance ever becomes an issue for search performance: In my day job, I’ve had a good experience with using Lucene (or rather Solr, which uses Lucene indices as it’s backend) for arbitrary combinations of search terms on large databases (tens of millions of documents). But that has of course its own challenges…
I’ll keep that in mind if the performance is bad. I haven’t had to denormalize much of anything yet in the schema: SQLite seems to be doing great, as long as there’s a relevant index.
I actually coded next to one of the inventors of Solr as he invented it (15 years ago)!
For Docker users, this wouldn’t be bad: add a couple apk install commands and all’s well. Docker consumers don’t even seem to care about image size (although I do a multi-step build and use Alpine to keep photostructure/server as small as possible!)
PhotoStructure for Desktops is cross-platform, and I’m very hesitant to add larger dependencies there, though. I’d love to use Postgres, for example. SQLite is only 2MB, and Postgres’ installer is ~300MB. The entire PhotoStructure for Desktops installer is currently half that. Lucene/Solr is similar. Great tool, but a huge wad of code that would come with it.
Totally understandable. The cost of such an additional dependency and - probably even worse - maintaining an additional index data structure or even replacing the existing database would be quite high.
PhotoStructure could probably get away with using Lucene directly, although this might get complicated if you are using multiple workers writing to the index. Anyway, I didn’t intend to suggest a change here - just wanted to put a little bit of knowledge out there.