Jump to content

How to search using 'contains' tag modifier


Recommended Posts

I would like to find notes with tags that contain a certain set of characters but do not necessary start with these characters (or necessarily end with these characters). 

Is this possible?  Right now I can only find a way to search for tags starting with a set of characters.

Thanks!

Link to comment
  • Level 5

If you open the mobile client, notes view and then tap the magnifying glass, you get at search. Tap on filters, tap on tags and enter a middle string.

The list that opens shows all tags holding this string, no matter where.

No idea why the mobile client does it differently, but it helps.

  • Like 2
Link to comment
1 hour ago, Grant837 said:

I would like to find notes with tags that contain a certain set of characters

 

As far as I can see, in common with general text searches, wild card characters can only be used at the end of the tag name. So you can search for notes that contain tags starting with a character string but not which simply contain a character string.

Difficult to comment further without knowing exactly what you are trying to do. Sometimes it is possible to split up a long tag into two shorter tags and tag the note with both of the new tags. Then searching for the second part of the original tag is easy.

Link to comment

I was afraid it was not possible. 

Here is an example

EU0034RT
NA0034RT
EA0034LT

The first letters are the region, the middle numbers are the product number, and the last two are the basic design types.  I need to search on only the product number.  I would rather not break down these codes, because that is not how they are used in my other systems.

Another example:

🪵Keyword

I do not want to have to enter the emoji each time

The odd thing is, if I just ignore searching specifically on a tag, and just search for a word in the middle, search also finds notes with the tags I would want... but I can not use that to make efficient saved searches.

Link to comment
  • Evernote Expert

As a workaround, and presuming  you have a limited number of regions, you could search NA0034 AND EU0034 AND EA0034. The Boolean search is only available in Professional and Teams accounts but I think you could compose an Advanced Search.

Actually it would better practice to break your TAGS down three separate items. Still use your normal label in the text but have a set oRegion tags, another set of Product Number tags and also a set of Tags for Design Types.

As for the Emoji issue, put the Emoji at the end of the tag and, perhaps add a space.

Link to comment
1 hour ago, Grant837 said:

The odd thing is, if I just ignore searching specifically on a tag, and just search for a word in the middle, search also finds notes with the tags I would want... but I can not use that to make efficient saved searches.

Why not? Assuming those codes appear in the body of the note there is no reason why you cannot save a search which searches for that text. You might need a general tag to reduce the number of false positives. Or, assuming you have a limited number of regions, use something like.

any: tag:EU* tag:EA* ...

Obviously if you have one producr mentioned in a note about another product, the search will pick that up as well so you will get false positives

Breaking the tag down into three is, I'm afraid, the only guaranteed way.  Encoding more than one piece of information in a tag is always going to be less flexible.

  • Like 1
Link to comment
On 6/18/2023 at 11:06 AM, Mike P said:

Why not? Assuming those codes appear in the body of the note

On 6/18/2023 at 11:06 AM, Mike P said:

The odd thing is, if I just ignore searching specifically on a tag, and just search for a word in the middle, search also finds notes with the tags....

 

I am not sure you understand what I meant:  Rather than searching using "Tag:.(emoji)xxxyyyzzz",   I can do a general search on just "yyy"  and notes that use the tag "(emoji)xxxyyyzzz"  (and no part of the tag is in the general text of the note), will show up in the results.  This means that Evernote can search for text in the middle of at tag... they have just not enabled it when using the 'Tag:'  modifier

 

 

  • Like 1
Link to comment
On 6/18/2023 at 9:53 AM, agsteele said:

As a workaround, and presuming  you have a limited number of regions, you could search NA0034 AND EU0034 AND EA0034. The Boolean search is only available in Professional and Teams accounts but I think you could compose an Advanced Search.

Actually it would better practice to break your TAGS down three separate items. Still use your normal label in the text but have a set oRegion tags, another set of Product Number tags and also a set of Tags for Design Types.

As for the Emoji issue, put the Emoji at the end of the tag and, perhaps add a space.

Thanks, yes, all that is possible, but its more typing and structuring and tags... all which could be avoided if they would enable searching for any part of a tag.  I do not know what database model they use,  but I hope its one where this could be made possible 🙂

Still, I appreciate your advice, and will keep it in mind

Link to comment
On 6/17/2023 at 12:10 PM, PinkElephant said:

If you open the mobile client, notes view and then tap the magnifying glass, you get at search. Tap on filters, tap on tags and enter a middle string.

The list that opens shows all tags holding this string, no matter where.

No idea why the mobile client does it differently, but it helps.

Wow, that is interesting!  Thanks!  Its means there is hope it could work cross platform some day! 

Link to comment
On 6/17/2023 at 1:19 PM, Mike P said:

As far as I can see, in common with general text searches, wild card characters can only be used at the end of the tag name.

You are right!  I was focused on the list of 'suggested'  files, etc that comes up as you type... which will show results that use the middle of words...

I wonder why that is possible, but then when you say ' search '  that that list is not included in the results... odd...

Link to comment
On 6/17/2023 at 12:01 PM, Grant837 said:

I would like to find notes with tags that contain a certain set of characters but do not necessary start with these characters (or necessarily end with these characters). 

Is this possible?  Right now I can only find a way to search for tags starting with a set of characters.

Thanks!

The best solution I found what to use Ctrl-Alt-5, which opens the Tag search box, and there you can ' type ahead search '  on part of a tag, even if in the middle.  You cannot, of course, combine that with other search criteria.

This is a workable solution for me for now.

Thanks all for your thoughts on this topic.

  • Thanks 1
Link to comment
2 hours ago, Grant837 said:

I am not sure you understand what I meant:  Rather than searching using "Tag:.(emoji)xxxyyyzzz",   I can do a general search on just "yyy"  and notes that use the tag "(emoji)xxxyyyzzz"  (and no part of the tag is in the general text of the note), will show up in the results.  This means that Evernote can search for text in the middle of at tag... they have just not enabled it when using the 'Tag:'  modifier

 

 

This is interesting. It certainly looks as though EN is including looking at tags when you do a general text search. The general mantra with EN search is that it strips out punctuation (except underscore) when searching. Maybe in this case it strips out emojis as well. However that wouldn't explain why it can find yyyy. I would expect it to only be able to find xxx. In my testing, it will find the beginning of a tag (after stripping out special characters - emojis and punctuation) but I still can't get it to find the middle of a tag unless it is preceded by special characters.

Link to comment
1 hour ago, Grant837 said:

The best solution I found what to use Ctrl-Alt-5, which opens the Tag search box, and there you can ' type ahead search '  on part of a tag, even if in the middle.  You cannot, of course, combine that with other search criteria.

I'm not sure this is any different from using the filter. If you use the filter you can manually select as many tags as you like that contain the characters. You can also add other criteria, either in the filter, or in the search box having run the filter.

image.png.42417c18233ea2f6394fb69d63e68847.png

 

Note however that the filter only works using AND logic so you can't easily select all notes that have a tag which contains 0034. You would been to find the tags and then construct a earch syntax prase beginning with any:

The search text is also deleted after each selection so you would need to type it in each time. 

 

Link to comment

One other thought. This would only work for one of the sections of your tags, but you can choose which one. If you were to create a tag 0034 and put all the tags which contain 0034 as sub tags to the 0034 main tag. You don't need to add the 0034 tag to any notes. You could then select the 0034 tag (no results) and then use the drop down arrow to "include sub-tags". In this case it will then find all the notes which contain ANY of the sub-tags

See 

 

 

Link to comment
3 hours ago, Grant837 said:

I am not sure you understand what I meant:  Rather than searching using "Tag:.(emoji)xxxyyyzzz",   I can do a general search on just "yyy"  and notes that use the tag "(emoji)xxxyyyzzz"  (and no part of the tag is in the general text of the note), will show up in the results.  This means that Evernote can search for text in the middle of at tag... they have just not enabled it when using the 'Tag:'  modifier

 

 

OK I've done some more testing. For me, if you separate the individual "words" in a tag with a period, the EN text search will find notes containing the individual words wherever they are in the tag.

I created two tags containing a nonsense string in the middle (174.ayrt.289 and 234.ayrt.999). I assigned each tag to three different notes (no overlap). A text search for ayrt found all 6 notes. A text search for ayrt.289 found the three notes which contained the 174.ayrt.289 tag. I created another similar tag without the periods and it was not found by the search for ayrt.

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...