GP Software β€’ Twitter
Opus FAQs β€’ Manual β€’ Commands β€’ Objects

Populating a toolbar with most common tags


#1

Is it possible to create a toolbar that will automatically populate with the most common tags in the current folder and it's subfolders, which upon clicking on said tags will filter the lister to display only files/folders containing those tags?

I'm currently dealing with allot of images that can be categorized into multiple categories so they typical folder structure is becoming unwieldy. Thank you for your help!


#2

You could manually add buttons for specific tags to the toolbar, and set them to only appear when in and below certain folders. That is easy to do, but only suitable if you want to define things manually.

Having it happen automatically, by scanning the folder to see which tags are used the most in and below it, is not possible on the toolbar directly. A script could do it when you click a button, and show a UI of tags. It could be quite slow as it would need to look through the folders to find which tags were used, unless it cached the details in some way.


#3

This feature is very useful, I want it too, I've tried to customize a toolbar to filter by multi-tags, but failed.


#4

Hm, yeah I have tried sample code provided by you from another topic that allowed the user to make a button that would search a folder and it's sub-directories for the tag you input. I could easily modify that code to search for a specific tag and make a bunch of them, one for each tag. The thing is that it had three major problems. The first is that it was really slow. Even in a folder with few files it still took at least 30 seconds to find a single tag. The second problem is that it took me to a search page when what I'm looking for is more of a filter that will stay in the current folder. The third issue is that if you want to change the tags you want to search for, you have to go back and start the search process all over again. If it were a filter, it would be a matter of clicking one tag filter off and clicking another on.

A good example of what I'm looking for is the File Filter field, only it doesn't work with Metadata and it doesn't let you input more than one string (even when you have two of them on your toolbar)

I'm only a medicore programmer so I doubt I can make anything elaborate. If you have any tips or info on how I can go about this I would really appreciate it!


#5

I do not know if this is the sort of thing you are after, but as a photographer it is absolutely essential to me to be able to find pictures from keywords.

I have set up the Windows search on my image folders to index all the metadata etc.

I then use a small VB program on a button or context menu to plug search criteria into the appropriate search field in the Opus interface.

For example I could make a search of my Weddings folder for "Dress" and bridal bouquet" and "best man"; or even "Dress" OR bridal bouquet OR "best man". etc etc.

You need to know the SQL rules about Windows search, as there are some restrictions, but in general use it is absolutely fine and works like lightning.

It is an idea you could easily adapt to your own needs, perhaps.


#6

Thanks for the post. I actually did try your code before and it was very fast. The only problem I was having is that it wasn't picking up on the metadata of many of my pictures. It goes through window's search, so i'm guessing that it can only tag files that windows can?


#7

No. It has stopped working for me, too. I have been using the code for months but a recent windows update seems to have caused the code a problem. I have found other complaints about this on the web. The tags of jpeg images are not being indexed properly by the windows search

Eventually after an enormous amount of messing, I seem to have got it working again. I had to go into windows search and enable the jpg file type to index everything. Then I had to delete all my current searches and start again.

I am not saying this will work for you, other people seem to have gone through different hoops.

Personally I am sick of Windows updates breaking things that worked fine. To relate the problems I have had with thumbnails is an intrusion into private grief.

I can tell you that the windows search can definitely index the tags (or keywords as I prefer to call them) and most of the other common metadata fields. Getting it to work seems to be a completely different proposition.


#8

Hm, it seems I'm getting the same problem. Looking at the event log on my computer, search is having issues rebuilding the index.

This is pretty much par for the course with windows 10. Is seems that every few updates breaks something or resets all your settings. I would have stuck with 7 had I not needed the new features of 10.


#9

I have managed to get windows search working well. To be honest how you achieve it seems - from reading numerous articles - a black art. But it really is worth the effort, the return speed from the most complex search is extraordinary. In addition, the Microsoft SQL language is surprisingly rich.

What becomes immediately apparent is the was my macro is constructed is not the best way to go, so it is time to develop a different approach. When I have time I will start looking at a couple of ideas


#10

You may find the following info useful in regards to Windows search.

The following image fields are indexed by the Windows search engine:

Keywords (sometimes known as tags)

Copyright

Author (Photographer)

Subject

What does NOT work is the Opus Imagedesc (Caption) field - which is NOT indexed by the Windows search engine. However, if you copy the Opus Imagedesc metadata to the Opus Comment field, the Windows search engine will index that field.

The speed of the results from searching these indexed fields is extremely fast and very flexible. It really is worth the effort.

What is also very pleasing is the speed at which the Windows search indexer adds data to the index. Copy the Imagedesc to the Comment field and you can search on it a couple of seconds later.


#11

Thanks for the continued help, it's greatly appreciated. I managed to get windows search fixed again, now to tackle the main issue.


#12

Happy to be of assistance. I came across this piece from Microsoft that may prove useful

Test out using the info here and I am sure you will be as impressed with the speed of Windows search even with the most complex queries. In my 20 odd years in the imaging business, I have worked on image library systems running on extremely powerful Unix servers and Windows search is the fastest I have come across - although admittedly - I do not have six million images on my system. But when you are dealing with just thousands of images, it is just fine.


#13

wooh, that's immensely helpful. Thank you!


#14

evernessince

You might want to play with this button for doing searches using Microsoft indexing.

It works on the directory currently on display in the Lister window and is designed specifically for use with images. It lists all the main useful fields that Microsoft search indexes on images. NB: the caption field DOES depend on you storing your caption information in the Opus Comment field. I have copied the caption (userdesc) field to the comment field on all my pictures now. It adds a few bytes to each file, but it does mean that I can search my images and still have them retain compatibility with the caption field on Photoshop

You can use one, two or all three searches to find you images. The button should tell you if you break the Microsoft search SQL rules viz or viz "AND" and "OR"

It works fine and reliably here, but please feel free to adapt it to your own needs if you find it useful. That is until the next Windows 10 update breaks it!!!

.Metadata Search.dcf (13.5 KB)


#15

Thanks for this. Sorry if my responses have been slow, I've been dog sick all week long.


#16

Please find attached an improved version of the button, with better error checking and a slightly different logic to the searches. It overcomes an occasional though persistent problem with certain searches.

Metadata Search.dcf (14.2 KB)


#17

Honestly hadn't gotten around to testing the 1st one yet as I'm still battling the flu. Hopefully it's only another day and I can give this a shot. Thanks!


#18

Alright, got around to trying the button. It works great, searches quickly. Search wise this is all I need. Now I just have to make a toolbar with with broad groupings. Thanks for your help!


#19

Hi @Auden

Inspired by this thread I decided to do my own research on Windows Search. As you observed it's a bit of a black art but once you get the hang of it it's very useful. Personally I got a lot of help from this link. I subsequently took the liberty of plagiarising your dialog and converting to JavaScript.

As you can see I have added a few more search term selections but the main difference is that the query is built dynamically and displayed in a field that can be edited. This means you can add additional terms by hand or indeed create/replace the whole query by typing in this field. When you are ready, simply press OK to execute.

Another difference is that the last entered query is remembered and is used to pre-populate the editable field the next time the dialog is triggered. You can either edit this directly or if you type in any of the search term fields it will be replaced with your new selection(s). You can also use the Clear button if you want to start with a fresh manually entered query.

Image Metadata Search.dcf (15.2 KB)


#20

I am glad my labours (and believe me, when it comes to programing , they are labours) have inspired someone who really knows what they are doing.

That is a real improvement on my idea and I am going to give it a try as I have no doubt that Windows Search is the way to go when you are searching Image metadata. It is So fast.