I'm currently using Digikam to assign tags to my photos. However, these tags are like boolean (true/false) values - a picture either has a tag or it doesn't. I also would like to assign more complex meta-data in the form of key/value pairs. The values could be integers or strings of arbitrary length. The end goal is to be able to create more complicated filters or queries to only show images matching various requirements.
So far, I have not seen a way to do this directly. In order to do this with tags I would have to do something with the tag hierarchy - for instance, suppose I want to have a key that is the number of people in the photograph, where the value is a number. Then I would have to create a tag for each different value like /PersonCount/1, /PersonCount/2, and so forth. This could potentially create a log of tag, but also I'm not sure how I would (easily, if even at all) set up a filter for example to find all photographs containing between 7 and 40 people in it.
I did see where it is possible to set up XMP tags which apparently can have arbitrary keys and values without any maximum length. However, this would seem to require that the metadata be stored in the image itself and not in the Digikam database, which is not always desirable. In addition, it's unclear to me how much filtering I can do on such tags.
Is it possible to associate arbitrary key/value pairs to images and then create a complex filter involving things like ranges of values, logical conditions, etc. preferably without having to keep any of the data in the actual image files?