Filter Photos with No Category

Is there a way to view photos that don’t have a category, or perhaps a way to see the photos not associated with a particular category? I’m starting too find categories useful but sometimes I need to see the inverse of a category.

6 Likes

I have the same request. If I’m going through my photos to categorize them, with the intention that every photo should fit into a category, it would be nice to be able to see which ones have not yet been categorized.

No way I know of for Filter, but maybe Search. No idea if this is officially supported, or will continue to work in the future - but in the Search bar, you could type:

media:"EffectiveCategories IS NULL"

I think this should show you all the images that have no Category assigned - either assigned to the image directly, or inherited from a categorized Folder, Event, Album, etc.

Problem is, I have several categories that overlap, I’m not treating them like an either/or situation. Therefore, I don’t have any empty categories.

Unfortunately, the way it appears that Mylio has implemented Categories, I don’t think there’s any easy query you can enter into the current Search field for presence/absence of particular Categories.

I can show a very very geeky way of doing this if you’re so inclined until we have a “not present” User Interface for categories. This is by no means a long-term solution, and may not work in the future, but if you need this in a bind it can help you out for now.

Inside the console type the following 2 commands:

cls

categories show

Then look up the category you’re interested in. In this case I’ve added a category called Forum which shows up as:
Forum, 0x0B, 11

Now, for the fun part… Calculate 2 to the power of the right-most value that is returned. That would be 2 to the power of 11 in the forum example above. Easiest way, in Google type in: 2^11 and it will show the result as 2048.

Then in the search box, type in:

media:“NOT EffectiveCategories & 2048”

This will then return all items that don’t have the Forum category applied to it.

PS: Make sure to fix up the double-quotes if you copy/paste the above search to Mylio. A lot of browsers will change quotes to slanted quotes, which won’t work in Mylio.

1 Like

Yeah, I figured it was a bitmask - hence my “no easy query” comment :slight_smile: Thx.

1 Like

tried this… after typing in “categories show” (without quotes), it just says “Done”.

1 Like

I apologize, that command is:

categories status

1 Like

That works - but beware, the number changes if you change the order of the categories!

1 Like

One minor point - it appears that the Categories implementation may have changed slightly with ver 3.8? I notice for images imported prior to 3.8, the absence of any categories is represented by NULL. For images imported since 3.8 this appears to represented by 0 (Zero) instead.

So to see ALL the images with no category (either inherited or directly-assigned) I think you’d need to type:

media:"EffectiveCategories IS NULL or EffectiveCategories = 0"

Ugh, yeah it’s not an upgrade thing. It’s that we have two slightly different models between leaving a value at null (0) the first time and setting it to null (0) the second time. The first results in the null you see, the second in 0. (It’s not a default thing either, just an inconsistency).

You can use the above to handle that, or alternatively COALESCE(..., 0), so:

media:"COALESCE(EffectiveCategories,0) = 0

For the sake of completeness, I have found that if you change the order of your categories, you actually have to convert the second value to decimal from hex and use that rather than the right-most value, which is the presentation order. In Deon’s example, they are the same (0x0B is 11). On my system, I have (for example) HDR, 0x38, 11, and so to check for HDR images I have to work out that 0x38 is 56, and calulate 2^56, which is 72057594037927936 :slight_smile: . This is indeed very geeky!

1 Like

Personally I don’t use categories but I do use keywords. (Someday I’ll figure out the pros and cons of each)

Is there any way to filter/search for photos that do not have any keywords?

Try this search:

media:"keywordsStr = '' "

That has a double-quote at the start and end, and two single-quotes after the = sign.
Make sure the quote marks are straight ones, not ‘smart’!

1 Like

@aearenda - Thanks! that worked perfectly! I’ll just have to remember to copy and paste that query when I want to use it. Even better would be a built in way to filter for that, or some how save the search but at least I have a solution now. Thanks again!

You can pin searches for future use! If you tap/click the tiny down-arrow at the right of the search box, a dialog opens in which you can tap/click the pin icon, and see past queries you have used:


In there you can tap/click the greyed pin icon on the right of each search to keep that search in the list. I have two pinned queries in this screen shot; clicking the white pin would remove their pinned status.

1 Like

@aearenda - Awesome! That’s exactly what I was looking for. Now it’s really easy! Thanks for your help!

You are welcome - I should add that searches based on ‘media:’ aren’t always going to work in the future - for example, if the underlying database is changed in a future version. You need to use it in this case, because the ‘keyword:’ search does fuzzy matching and can’t search for an empty keyword.

Also, I was pleased to find out about this approach from this post by @jimre.