Jump to content

(Archived) Is # OK in search?


Recommended Posts

Posted

I'm planning a change in my EN use and I'd like to check something. I feel unorganised when I have too many tags so I'm planning a two level tagging system for my notes, the top level being real EN tags and the second (more specific) level being keywords that I will put on the last line of my notes as needed. For instance I would index a note for a hotel I like as top level EN tag "Travel" and then a keyword of #Hotel added by me inside the note (and maybe others like #Italy, #Venice, #Luxury etc).

The reason for "Hotel" rather than just "Hotel" is because firstly it makes it massively less likely that I will get false positives on my searches and only hit my explicitly added keywords and secondly (as already reported and noted by Dave with a "thanks for the suggestion" reply) the fact that search terms in notes are highlighted and can't be turned off really bugs me so I think my approach will at least mean that only the one word on the very last line of the note will be highlighted and that's OK.

I'd like to use "#" as my unusual prefix because it is consistent with twitter tags and just looks right to me (from my old C programming days perhaps) but I'd just like to check that # doesn't have some special meaning in the search grammar or isn't planned to be made special any time in the near future. I did scan the 3.5 appendix and couldn't see any mention of it.

Am I OK to go ahead with my plan?

- Julian

Posted

The # has no meaning for search. Actually, most special characters are ignored. So, the only way that you can use an 'unusual prefix' for your internal tags is to use _. So, _hotel can be searched for and found. Searching for #hotel will find you all occurrences of "hotel", with, or without, the #.

  • Level 5*
Posted

In addition to what Crane says, it appears that if you use # as a prefix for an actual tag (e.g. #hotel), a search for 'hotel' will turn up notes any that are tagged with '#hotel' as well as any notes that contain 'hotel'. However, a tag search for '#hotel' (tag:#hotel) will only turn up the notes tagged with '#hotel'. Sounds like just using a real tag with a funny prefix might suit your needs: you won't need to explicitly add an an artificial keyword at the end of your note (though you do need to explicitly add the tag), and you won't have anything highlighted. This also keeps the new special tags in the tags system, so you get typehead on tag dropdowns, which I find to be very useful.

~Jeff

Posted
Sounds like just using a real tag with a funny prefix might suit your needs: you won't need to explicitly add an an artificial keyword at the end of your note

Thanks Jeff but I think that would definitely not work for me. Since I was more concerned with the choice of special character I probably didn't spend enough time explaining what I was trying to do with the two level system. The whole point of having the second level of tags (keywords) is to keep my real EN tags to a manageable level, sort of like a top level folder structure. If I do decide to tag hotels with the city and country that they're in, just as one example, then I'll probably end up with a couple of hundred tags just for that, add all the other things I might start adding very specific second level tags for and I soon end up with an EN tag list that is thousands of entries long and I really don't want that.

Ultimately I'm looking to add what approximates to a three-level hierarchy. The first level is implemented by having two notebooks, one for personal and one for work and because of ENs capabilities to search all notebooks I don't need to stress too much about whether I file my favourite hotels in the Work or Personal notebook (for example) because if I'm searching for travel stuff then I just do an all-notebooks search. The second level is implemented by the real EN tags and is sort of like having folders for very broad subject areas like "Travel" and "Technology" and the final level is my embedded keywords. If my experience from GMail is anything to go by then most times I won't need to use any of this to find stuff because straight text searches will get me exactly what I need but having tags and keywords is a safety factor in case for some reason my searches don't find what I'm looking for. I think it'll work OK for me.

Thanks also Crane. I've done some experimenting and discovered that you're absolutely right as far as my experiments on the Windows client (3.1) are concerned BUT on the iPad EN goes even further and also ignores "_" (and "£" which also behaved well on windows but fails on the iPad). I think that my solution will be to use "x" as the prefix so I get xHotel; at least no changes or platform variations of the search syntax are likely to mess with me in the future with this choice and "x" is right there on the main iPad keyboard so needs no mode-shift operations to get to; on reflection it's axtually a better solution than # even if # had been possible.

- Julian

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...