Home / GitHub Page

Practical Use of Tags

Not so much a support request as some advice sought - with the availability of the Full-Text Search I’m struggling to find a practical use for Tags that doesn’t just give the same results that FTS would anyway.

For example, I thought I’d tag my beer recipes with the Style, e.g. tags beerstyle:IPA, beerstyle:Amber but in practice, the IPA and Amber words are, essentially, always in the title or text somewhere and so the tag adds little value.

Hoping someone can share a tag strategy that goes beyond a cut-down FTS. Thanks in advance.

I like tags but have found the use of them in Joplin cumbersome so use a lot less than I did under Evernote.
There are several reasons that tags go beyond FTS which are limited to the words in the text. Here are a few:

  • Traditional the association between a folder and tag is unique. Tags allow multiple associations. This is what tags always were. Some apps now allow a note to be in multiple folders. In other words, they are used as tags. Logically then you can then have notes marked with the tag FolderA or FolderB, etc.
  • You can standardise spellings - some words have different spelling and particularly regional spellings (-or vs -our, -ise vs -ize) can be eliminated. It is much quicker the correcting spellings in the original document. Sometimes the wrong word is used or spelt incorrectly - such as common misspellings.
  • A single tag can be used to mark text of the same language or same source. In later searches, this makes them easier to find.
  • Generic terms come up everywhere but some words have different meanings depending on the context and often technical meanings. Tags allow you to find a subset of meanings. Eg. tag:economics AND efficiency. In neoclassical economics, the word “efficiency” has a technical meaning that has nothing to do with the general understanding of the term.
  • Two or more words have the same meaning. E.g. again from economics: market liberalism = economic rationalism = Thatcherism = Reaganism - it is all the same thing and just regional variations
  • if you keep the tags very short, preferably one word, you can use set theory and boolean algebra to reduce the select from thousands to just a few and refind searches. The basic operations of Boolean algebra are as follows: AND (conjunction, denoted xy (sometimes x AND y ), OR (disjunction, denoted xy (sometimes x OR y ), NOT (negation, denoted ¬ x (sometimes NOT x , or ! x ) This is Joplins greatest deficit.
  • It pretty standard find the same word in noun, adjective or verb form in different text and usually the spelling will be different for each grammatical form. These variations can be again marked with a single tag.
  • Associations that may go beyond the original article. Articles are written for a particular audience and have a specific purpose but when you read them it, you may find something in it that goes beyond the original intent. Tags allow you to collect notes under one topic in any way you like, independent of the original intention of the article.
3 Likes

Many thanks for that comprehensive answer … much to think about.

Would you mind sharing what would make them more useful in Joplin? What would the top tag features that are missing?

Laurent,
could I send a videolink directly to you to explain the Tagging - issue by a short video?
regards Patrick

Please only post here so that everyone can benefit. Text is probably better (quicker to read and can be searched) but if not a video might do.

Ok. Here a screenshot…

I am using tags a lot - I do all my administration with this… so a good tagging system is very important for me…
at the moment it is to complicated to do see which tags are used in joplin…

hope this help to get the idea:

1 Like

I agree with Voyflen in that the lack of Boolean operations for tags is the biggest drawback. Most apps that support tagging at least allow for AND queries using multiple tags. This could be done via gui by allowing to select more than one tag. If not only AND but also OR and NOT (and maybe XOR) are to be supported, I guess it makes sense to do those advanced tag searches in the search bar instead.

2 Likes

a search with “tags:mytag” should be helpful too, something I explain a long time ago

thus something like “title:movies body:power tags:superhero,marvel” could be an example of search

The main issue is to create a UI that works well for tags. Perhaps we should take inspiration from existing apps. Do you have any examples of apps that handle tags well?

may be something directly taken from evernote

I think there are two basic options that might be combined:

  1. Modify the search engine to accept Boolean commands and add a tag keyword (e.g. (tag:mytag1 AND tag:mytag2) NOT (title:mytitle1 OR title:mytitle2))
  2. Allow to Ctrl/Cmd-select tags and show notes that contain all of the selected tags (AND operators between tags)

I think most people would be happy with option 2 but option 1 would also improve the search function in general which is nice for power users.
I think most apps use some variant of option 2 like Turtl:

1 Like

I have been away for a few days so I am not up to date with what is discussed here. Here is my formulated reply.
Searching with tags. Thank you for your request. I will try to keep this short but helpful. The short shortcut keys are for Windows but it would not be hard to guess what it would be for Apple.
If you have thousands of notes the first attempt to find the right note is likely to fail. The issue is always how to start. In some cases, it may be obvious, but in the more general case, it is not.

  1. So, you start with a guess, say one or two tags plus a Boolean operator (typically A AND B). This results in some hits but many near misses (false positives).
  2. Browse a few of the notes at the top of the list, sometimes even the title is enough, and it is mostly pretty obvious if you are on track and how the search can be refined.
  3. One option is to edit the search to exclude specific things you don’t want as these will stand out and may be labelled with a tag C (A AND B AND NOT C).
  4. Checking the search results again, you might like to narrow it down again in which case the additional tag D could help (A AND B AND NOT C AND D).
  5. The results are pretty good now and it would be useful of save the result by adding the tag E. Next time you want this result you just have to search with the tag E. Select all the search results with ctrl-A and then add the tag E in one go.
  6. If you are interested in searching certain folders make sure everything in that folder is tagged with that folder name (group tag function: ctrl-A for the selected folder notes, plus add tag). Say I want to find the notes with tag K in folder X (tagged folderX) and folder Y (tagged folderY), this can be searched with tags ((folderX OR folderY) AND K).
  7. Say you decided the notes with tag E are not wanted and you wish to delete those notes out of folder X and Y only. Then you would search with tags ((folderX OR folderY) AND E). The search result shows the notes you DONT want. You can now browse through and delete them individually, or group select (ctrl-click) on those notes you want to delete, or delete all in one go (ctrl-A and then hitting Del button).
  8. A final useful function with tags is to delete all unused tags (not assigned to any of the notes). It reduces clutter. If you select all notes with the tag E and delete these notes, there is still may be a tag E left in the tag register as a remnant.

The principle is that all editing is done from the search bar with a simple syntax that allows Boolean algebra of multiple tags and preferably nested expressions. I don’t like the Excel syntax for Boolean expression e.g. OR(A, AND(B, NOT©)). Too many or not enough brackets, who knows? I don’t like bracketing tags but you could bracket operators with a symbol such as .AND. and .OR. and .NOT… This is clear text. Boolean Algebra uses a notation of a different type and can be approximated on the keyboard AND(A,B)=A.B, OR(A,B)=A+B, NOT(A)=!A. I would insist the tags be specific so no string search notation with the characters “*” or “.”. You could then use them as logical operators. It is up to you what is easiest.

NOT© should be NOT bracket C bracket

Use Not(c\).

I agree with @foxmask here. Syntax in the vein of body:stuff tag:a tag:b is sufficient for most things, and still accessible. (People already use it in Outlook, Gmail and whatnot, after all.)

Anything that involves operands or parens, like stuff AND (a AND b OR c) might be more powerful, but will be incomprehensible and/or cumbersome to most common users.

2 Likes

I think I have to agree with you. This behavior could also be obtained through a UI solution like the one I described above (option 2) which would serve as a user friendly alternative to the search syntax. I think implementing both is the way to go.

One thing I do with tags is to mark all tasks. This way the tasks can live in separate notebooks but when I want to get a list of all the tasks (like the org-mode agenda if you know that) I can just select the “tasks” label.