Jump to content

how to search for a word while ignoring the tags


Recommended Posts

When searching for "London", my results display all items that have the word in the title, body OR tags.

I need to search for all notes tagged with London that do not have the word in their title or body.  My goal is to eliminate some tags and rely on search alone, but first I want to see how many notes would not get picked up by a search for London were I to remove the London tag.

I know how to search for items not tagged as London (-tag:London) but is there a way to search for a word in title and body only while ignoring tags?

Link to comment
  • Level 5*
22 hours ago, lisec said:

I need to search for all notes tagged with London that do not have the word in their title or body.

Does tag:london -lond work?  I just tried something similar using an address tag (tag:1445* -144) and it seems to work.  Key was not typing in the all of the tag for the text.

Link to comment
  • Level 5*
2 hours ago, lisec said:

I need to search for all notes tagged with London that do not have the word in their title or body.

This search would be: tag:london -london -intitle:london

2 hours ago, lisec said:

I know how to search for items not tagged as London (-tag:London) but is there a way to search for a word in title and body only while ignoring tags?

This would be a different search, right? Should be: london intitle:london -tag:london

I'd have to contrive some test data to try these out, need some time for that...

Link to comment
  • Level 5*
8 hours ago, jefito said:

This search would be: tag:london -london -intitle:london

This would be a different search, right? Should be: london intitle:london -tag:london

If I understand the first post, a search of  -london also includes the tags
(Windows feature?) edit: also Mac
in which case I'd go with  @gazumped's idea of renaming the tag

Link to comment

DTLow is correct.

Note1 does not have London in its title or body, but it is tagged with #London. That's the note I want to find.

There is only 1 way to find that note when using its London tag as a filter, and that is to search the title: tag:#London -intitle:London (or its variants, e.g., -intitle:Lond*)

Without specifying the title, searches look at both note content as well as tags. (Hey, at least it doesn't also search notebook titles!)

I'm not averse to the search function including tags in general, indeed, it can be useful especially when you forget the tag's exact formulation, but I'm not sure I like that there is no way around it.  Perhaps it is a bug?

Link to comment

I have, and it does exclude some notes, but for the life of me I can't figure out why.

The results show a whole bunch of titles that include London, so it looks for exact maches in intitles (unless I end the search with an asterix), so I know they are not being filtered according to my search.  One would assume, then, that it is looking to the content of notes for Lond and excluding those notes. And  there are notes that are being excluded. I just can't find the search term in them. At all!

I searched for tag:#London -Londo and one of the notes that gets excluded has no text and only 3 pictures with absolutely no words (signs, etc) in the pictures.

When I searched for tag:#London -L, 4 notes got excluded but searching within the note only displays ending "l"s as in the phrase "as well. ".

TItles are never excluded when the search contains the partial word searches -Londo or -L

I think I'll have to re-create the tests I did earlier today with 5 notes with different content, e.g. 1 with Lon another with Lond etc and see which notes get excluded.

It's all getting to be very complicated ?

 

Link to comment
  • Level 5*
48 minutes ago, lisec said:

I have, and it does exclude some notes, but for the life of me I can't figure out why.

The results show a whole bunch of titles that include London, so it looks for exact maches in intitles (unless I end the search with an asterix), so I know they are not being filtered according to my search.  One would assume, then, that it is looking to the content of notes for Lond and excluding those notes. And  there are notes that are being excluded. I just can't find the search term in them. At all!

I searched for tag:#London -Londo and one of the notes that gets excluded has no text and only 3 pictures with absolutely no words (signs, etc) in the pictures.

When I searched for tag:#London -L, 4 notes got excluded but searching within the note only displays ending "l"s as in the phrase "as well. ".

TItles are never excluded when the search contains the partial word searches -Londo or -L

I think I'll have to re-create the tests I did earlier today with 5 notes with different content, e.g. 1 with Lon another with Lond etc and see which notes get excluded.

It's all getting to be very complicated ?

 

I think if you use the text term -London EN finds the tags and removes those notes tagged with London from the search.  If you use -lond as the text term EN does not find the London tag so thise notes are left in the search result.  I think anyway. 

I did not test  any intitle seaches but my guess is they wouldn’t consider tags like the text search does.  

Link to comment
  • Level 5*
7 hours ago, DTLow said:

If I understand the first post, a search of london or -london also includes the tags (Windows feature?)
in which case I'd go with  @gazumped's idea of renaming the tag

I was hoping that adding the -tag:london would override the implied inclusion of a tag search that a search term of "london" gives (and ditto for -intitle:london"), but as I said, I didn't have time to generate a test set of notes to try out my assumption, so my bad.

In any case, this should not be just a Windows feature, as it is in the search grammar (http://dev.evernote.com/doc/articles/search_grammar.php), explicitly (or at least for the a simple search on "london"):

Quote

If no advanced search modifier is found in a search term, it will be matched against the note as a text content search. Words or quoted phrases must exactly match a word or phrase in the note contents, note title, tag name, or recognition index.

The question of whether "tag:london" is an "advanced search modifier" includes "tag:" or "-tag:" terms is open, since "advanced search modifier" doesn't appear anywhere else in the search grammar documentation. That being said, I'm guessing that it refers only to the scope modifiers in the previous section, namely "notebook:" and "any:" (and maybe "stack:", though that doesn't appear in the search grammar, but does work in the Widows client at leat).

Anyways, sorry for the confusion. It would be nice to be able to be explicit about searching for text terms but not in tags or titles, maybe something like "text:london" or something like that.

Link to comment

Archived

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

×
×
  • Create New...