how to make use of tag hierachy

Hello, everyone,
I’m trying to rebuild my tag database and get into the topic at darktable. On the one hand it is missing practical experience how to assign tags to avoid too many nonsensical tags, on the other hand it’s also about understanding how darktable works here.

I can see that darktable does not work the way I understand hierarchical tags.

Example: I have created and assigned the following tag structure.

Skyscraper|Frankfurt am Main|Westhafen

I have attached “Westhafen” to the appropriate pictures. Now I expected that these pictures were added to the tag collections “Skyscraper” and “Frankfurt am Main”.

Unfortunately this is not the case and in the darktable online manual is also described that parent tags/categories do not add information to the image.

To achieve this I would have to add the tags “Skyscraper” and “Frankfurt am Main” manually to the
pictures. That is very, very much work on a large number of images.

For me as a beginner it is difficult to understand why I can build a hierarchical tree of tags
but when I look for parts of the hierarchy I can’t find the images because the parent tags are not
written to the images.

During my research I read that LR for example handles the hierarchical tags in the way I understand tagging images.

But maybe I’m still using tags the wrong way, I’m a beginner and I’m still looking for my way how
to do it best.

Is there an option to change the behaviour to darktable or can one of you explain me how to do
it better?

Kind regards,
Marcus

Hm, I do not exactly understand what you are trying to to achieve. The hierarchy is of course added to the images. If you want to search in an efficient way, you have to use wildcards, especially the % sign. What I do not understand is your hierarchy. For me, this would be two tags, one describes the place (places|Frankfurt am Main|Westhafen) and one the subject (subjects|skyscraper). With wildcards you can now search for all images in Frankfurt without adding it explicitly as a tag. The darktable approach gives the maximum degrees of freedom here.

1 Like

A tag hierarchy is used to group related tags, in the sense that a tag higher in the hierarchy applies to all images with one of its child tags. Ideally, a tag doesn’t appear in two trees (e.g., you shouldn’t have skyscraper|Frankfurt|Westhafen and church|Frankfurt, but rather buildings|skyscraper + places|Frankfurt|Westhafen, and buildings|skyscraper + places|Frankfurt).

Tagging can indeed be time consuming, but you do it only once for a given image. And to help speed up the process, you can select several images and then apply one or more tags to all of them. You also don’t have to apply all tags in one operation. E.g. you start by selecting all images taken in Frankfurt, Westhafen, apply that tag, repeat for other locations, then select all skyscrapers and apply that tag. Repeat for all images.

But in all cases, tagging a whole collection is going to be time consuming…

1 Like

Thank you @chris @rvietor
Sorry… I don’t understand what I have to do :frowning:

I just added the tag “test-skyscraper” to the picture.

When I click on “test-westhafen” or “test-frankfurt” in the tag collection, the subordinate image is not shown.

If I want the picture to be displayed when I click on “test-westhafen” or “test-frankfurt”, I have to add these two tags to the picture as well.

My expectation was that this happens automatically, cumulated to the parent tags.

I know that this work is very time consuming. Therefore I prefer to ask you now before I do everything wrong and have to start all over again :slight_smile:

Kind regards,
Marcus

First, a question for you: how are you going to select all skyscraper pictures (in Frankfurt, or elsewhere)?

Note the “skyscraper” tag two lines above the lower right red box, and the numbers in parentheses.

1 Like

I would like search for “Skyscraper” and want to see that the picture was taken in “Frankfurt”. But when I click trough the tag collection Frankfurt, I want to see all skyscraper pictures as well.

You can ignore that. I played with the tags and the possibilities…

Sending from mobile, so I cannot test if I got the syntax correct, but I guess it’s in the manual too. You can add the “%” sign as wildcard, e.g. “Frankfurt|%” in your tag search.

Edit: Discourse does some weird things here, I have to correct it later at the PC.
Edit 2: I had to escape the % sign to make it appear correct, otherwise it would start math content.

1 Like

To complete chris answer, you can use the % sign without even typing it:

  1. Simple click on a tag will search for the images containing the exact tag (Frankfurt)
  2. Ctrl+click will search for images with children tag only (Frankfurt|%)
  3. Maj+click will search for images with either the tag or its children (Frankfurt%)

From what you described, I think this last option is the one you are looking for.

1 Like

@EC1000 Th at works great :slight_smile: Thank you!

Is there a way to apply parent tags automatically to images when a subordinate tag is applied? In my opinion this is missing in darktable.

Kind regards,
Marcus

If you mean automatically add “tag1” and “tag1|tag2” separately when you apply “tag1|tag2|tag3”, I don’t think so. But these two tags are already included inside “tag1|tag2|tag3”, so you should not need to add them separately.

Moreover, when you export you image, “tag1|tag2|tag3” will be export as “tag3” and you can choose whether or not you want to export “tag1” and “tag2” (by default, they are; except if you chose “omit hierachy” in the metadata configuration, then they are not).

1 Like

@EC1000 Many thank. Now, my understanding of tagging and exporting with tags is much better. That works great for me.

One last question: is it possible to set the % sign in the search as default? Maybe a setting in darktablrc?

Kind regards,
Marcus

I don’t think it is possible.