Author Topic: Restrict search to Gallery - is it possible? - Would be a great feature  (Read 1685 times)

0 Members and 1 Guest are viewing this topic.

pie.photo

  • Member
  • **
  • Posts: 8
    • View Profile
I have some troubles with the search function of ThumbsPlus 10. Searching only for keywords runs quick and without any troubles.
But always when I need a more restricted search there I have problems.
Often I would need a search which is restricted to only one specific Gallery. I have not found a solution for such search. Is it possible?
I have some knowledge about SQL statements but I am not able to find a way to make it run.

Another problem: I already searched by date with Advanced Search and the field tn.[file_time_iso]. But it seems to me that even that is no longer possible. Maybe that something has changed with Version 10? I don't remember the last time that I have searched by date successfully.

I hope, this program is still alive because I love it. It's very quick, simple to use and easy to configure for the use together with other programs. These are the reasons why I still stay with ThumbsPlus. But I would like to see some improvements for search functions (date/time, gallery, gps data - search by rectangle of a map, ...).
Many thanks,
Ernst

Daan van Rooijen

  • Administrator
  • Sr. Member
  • *****
  • Posts: 933
    • View Profile
Hi Ernst,

I don't know about those date searches. Maybe we can look into that later.

As for gallery searches: If you don't like SQL, a possible workaround is that you simply assign a unique keyword to all the files in that gallery, and then do a regular search for that keyword, plus your additional search criteria.

If you prefer an SQL method, I will copy 2 very old but relevant messages below from the old Cerious Newsgroups. They come without their original context (otherwise I'd have to copy and paste whole threads), but the information contained in them could still be helpful, I think.

Regards,

-Daan-

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=[ 1 ]=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
From: "Jose G. Filippa" <jose@cerious.com>
Newsgroups: cerious.support
Subject: Re: Thumbsplus 7.0 problem with gallery search
Date: Fri, 14 Apr 2006 10:14:46 -0300

Hi Chris,

In order to find those thumbnails which are included in at least one gallery
or sub-gallery but are not included in a specific gallery you should use the
following SQL statement:

tn.idThumb in (select gt.idThumb from GalleryThumb as gt) and tn.idThumb not
in (select GalleryThumb.idThumb from GalleryThumb inner join Gallery on
GalleryThumb.idGallery=Gallery.idGallery where Gallery.name like 'UF\%')

Now for a set of galleries and sub-galleries you should use:

tn.idThumb in (select gt.idThumb from GalleryThumb as gt) and tn.idThumb not
in (select GalleryThumb.idThumb from GalleryThumb inner join Gallery on
GalleryThumb.idGallery=Gallery.idGallery where Gallery.name in
('UF\Gallery1','Temp'))

(Note that you can not use wildcards when using the "in" operator.)

Or if you really need to use wildcards:

tn.idThumb in (select gt.idThumb from GalleryThumb as gt) and tn.idThumb not
in (select GalleryThumb.idThumb from GalleryThumb inner join Gallery on
GalleryThumb.idGallery=Gallery.idGallery where  (Gallery.name like 'UF\%' or
Gallery.name like 'Temp%'))

By the way, your query (the one that hung your ThumbsPlus) worked OK in
ThumbsPlus in my system. I will continue investigating about this issue.

Best regards,

José G. Filippa
Cerious Software



=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=[ 2 ]=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
From: Uwe Zimmermann <uwezi@/no_mail/sciencetronics.com>
Newsgroups: cerious.support
Subject: Re: Search Gallery
Date: Mon, 01 Nov 2004 12:56:16 +0100

Until galleries finally work like normal directories, you should be
able to use the additional SQL query:

this is for one specific gallery "galleryname"
-----------------------------------------------
exists (select idThumb from gallerythumb gt inner join gallery
ga on gt.idGallery = ga.idGallery where ga.name = 'galleryname' and
gt.idThumb = tn.idThumb)

this is for images in any gallery
-----------------------------------------------
exists (select idThumb from gallerythumb gt where
gt.idThumb = tn.idThumb)

    Uwe.
I'm volunteering as a moderator - I do not work for Cerious Software, Inc.

Daan van Rooijen

  • Administrator
  • Sr. Member
  • *****
  • Posts: 933
    • View Profile
I just realised that those old newsgroup messages must have been written with the old .TD4 database format in mind. Hopefully you can 'translate' the field names to those used by TP8 and higher.
I'm volunteering as a moderator - I do not work for Cerious Software, Inc.

pie.photo

  • Member
  • **
  • Posts: 8
    • View Profile
Sorry for the late response.
My ThumbsPlus database is running on PostgreSQL. So I think that I should have the tools to find out the right field names.
I'll give it a try.
Thank you very much Daan!
Ernst