Jump to content

Enable search of specific phrase


Go to solution Solved by BSR,

Recommended Posts

It would be extremely helpful to be able to search for specific phrases both across and within notes. For example, right now if I want search to return the exact phrase "net income", I have no way to do it. When I search "net income" across notes, I get notes that contain both of those words, but not notes that contain only that phrase. Similarly if I search "net income" within a note, I get results for "net", "income" and "net income" -- when really I just want the latter-most, complete phrase. This seems like a simple and common-sense search feature that almost all other programs have. Thanks for considering.

Screen Shot 2016-07-09 at 7.21.32 PM.png

Link to comment

I just realized the issue was that if you use the screen capture function, which I do a lot for taking class notes from online lectures, then putting quotes will not work. It will still return any of the words in the phrase, not the exact phrase. But, you are correct, it does work for the regular text within/between notes, outside of the images. 

  • Like 1
  • Thanks 1
Link to comment
  • Level 5*

Hmmn.  So:  a search for images is "resource:image/jpg" (without the quotes) or a search for specific URLs will find pages clipped from that/ those source(s).  Throw in your search for keywords amongst the results of that first search and you should be able to narrow down the hits to something useful...

OCR for images is different from OCR for documents - the words aren't strung together,  so the phrase search doesn't work.  Each word in image OCR is a mini-cloud of possible spellings - "net" might be hen/ bet/ set/ let,  and 'income' might be ... well,  you get the picture. (Vague pun intended...:P)

You may find that you do better with 'clip selection' which (AFAIK) will clip the text from a page and maintain a lot of layout where it can.

Link to comment
  • Evernote Staff
  • Solution

Hi there @lbatt;

The following is taken straight from our Evernote Developers Page on Evernote's Search Grammar, which can be found here:

Evernote's Advanced Search Grammar

Quote
Matching literal terms

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. Words in the content of the note are split by whitespace or punctuation. Words may end in a wildcard to match the start of a word. Searches are not case sensitive. (A wildcard is only permitted at the end of the term, not at the beginning or middle for scalability reasons on the service.) Multiple whitespace and/or punctuation characters in the quoted phrase or the note will be compared as if they were a single space. The backslash escape character ('\') may be used to escape a quotation mark within a quoted phrase. E.g.:

  • potato
    • matches: "Sweet Potato Pie"
    • does not match: "Mash four potatoes together"
  • Ever*
    • matches: "Evernote Corporation"
    • does not match: "forevernote"
  • "San Francisco"
    • matches: "The hills of San Francisco"
    • does not match: "San Andreas fault near Francisco winery"
  • -potato
    • matches: "Mash four potatoes together"
    • does not match: "Sweet Potato Pie"
  • ham
    • matches: "green eggs&ham."
  • "eggs ham"
    • matches: "green eggs&ham."

For a more basic outline of how to use Evernote's Advanced Search Syntax, please visit our Help Center article here:

How to Use Evernote's Advanced Search Syntax

I hope that helps!

Link to comment
  • 1 year later...
On 7/13/2016 at 10:29 AM, csihilling said:

Actually put quotes around net income in the search, "net income" and you will only get notes containing the exact phrase net income.

This doesn't appear to work for me.

I'm in my default notebook with the Tag "Condo" selected. I entered Text:"tax code".  Below the search field is: "Viewing 194 notes in All Notebooks, matching ANY of the following contains words starting with Text tax  code tagged with condo."

I switched the "matching" option to ALL and got "No match"

I found the phrase "We are" in a title so I tried to search for it, I entered: Title:"We are" and got 34 notes only one of which contained We and are  and neither word was highlighted. I switched to ALL and not "no match"

 

What am I doing wrong?

 

Link to comment
  • Level 5*

To search for a phrase you only need the phrase in quotes, no text:, just “tax code” will do.  Text: is not a part of EN search syntax   The colon in your search was ignored and the word text was added to the search   So any note with the word text got added to the results in the ANY case.  Switching to ALL says you have no notes containing text and “tax code” which are tagged with condo.

To find a note based upon text in the title of the note, the correct phrase is intitle:”we are”.   No quotes needed if a single word phrase.  

  • Like 1
Link to comment
Thanks for responding.
 
I have selected the Condo Tab.  In the search field, I entered "landscape set". Displayed below the search field is to following: "viewing 51 notes in All Notebooks matching ANY of the following: contains the words landscape set Condo, Condo.Garden, cond,o.meeting, and shop.condo. 
 
I understand why the other tags were included, they are children but not why the phrase "Landscape set" is listed in only one of the Titles, and not highlighted. I haven't counted the number of titles, only one of which contains "Landscape set" but I assume its 51.  I've checked a few of the notes and they don't contain the search string.
 
So why have I gotten so many results that do not contain the search string and why is the search string that was found not highlighted?
 
I tried using Intitle:"Landscape set" and got the same result.  I understand "Intitle:" narrows the search to just the Title column. 
Link to comment
2 hours ago, csihilling said:

The search is returning notes that contain the tag condo or the phrase or both.  If you want notes that have only have both, switch to AND from ANY in the search.  

Why is finding data seem so NOT intuitive and so complicated?  Why can't I simply put a search string, in quotes,  into the search field and get ONLY the notes that contain that string, highlighted, so I can see them?  Why do I have to switch the boolean options after I run the search and get a page full up unwanted results?  EV is supposed to make finding things easy, no add obstacles that complicate the process. I get better results from Google!  I can't believe it's supposed to work this way, I can't believe I'm not doing something very wrong, but what?  

I'm not a computer novice, I've used computers since the days of DOS, I've owned every iteration of Windows, why can't I figure out how to find things in EV?

To be clear, I found a phrase in a list in the Titles column, I put that phrase in quotes and entered into the search field, my expectation is that the phrase that is in quotes will be found in that list of Title and presented in a list; if there is more that one such string and those strings will be highlighted so I can see them right away.  But it doesn't appear to work that way when I run the search. Why is that?

Link to comment
  • Level 5*
14 minutes ago, mikecox39 said:

To be clear, I found a phrase in a list in the Titles column, I put that phrase in quotes and entered into the search field, my expectation is that the phrase that is in quotes will be found in that list of Title and presented in a list;

To restrict the search to note titles, use     intitle:”phrase”

What results are you getting?

>>Why is finding data seem so NOT intuitive and so complicated? 

The above search seems simple enough, assuming there are no special characters

It gets complicated if you have complicated requirements.  There’s documentation at  Evernote Search Grammar

Link to comment
  • Level 5*
15 minutes ago, mikecox39 said:

Why can't I simply put a search string, in quotes,  into the search field and get ONLY the notes that contain that string, highlighted, so I can see them?

You can.  All your examples above are a combination of a tag and text.  If you just do the text search you will get notes with only that text.  Add a second search parameter and you have the Any or All option.  Default being All I think.  

And FYI, EN does not support Boolean searches.

Link to comment

Yes, I know that syntax.  Maybe EN doesn't use true Boolean search but it uses some variation of it because at's what those All or Any options are.

I'm sure that if everyone was getting the results I'm getting this program would not be at all popular.

BTW I had my IT  service run a tune up on my computer today, just in case I was infected with something, but they found nothing.

 

 

59c744be61e56_noresult.thumb.jpg.9cfd87bc175a3531a6826e6f357ad6a4.jpg

Link to comment
  • Level 5*

Hi.  That display is doing exactly what you asked of it.  The search summary tells the tale - you wanted to see ANY notes which matched one of 5 tags,  OR had "so much" in the title.  I don't see any notes there that don't match that pattern.

If you want to see all notes with 'so much' in the title,  just deselect the tags...

My searches work fine -  (if you search 'intitle:' the results aren't highlighted)

59c797b06ab57_ScreenClip4.thumb.png.bdfdb0a26644d99a5f17a6b56efa9fa2.png

Link to comment
  • Level 5*

In the above if all you want are notes with “so much” in the title, remove all the tags from the search.

The search as it exists is looking for notes with any of the tags or the phrase due to the Any term.  Switching to All would yield notes with all the elements, which would be none based upon what is visible of the tag structure.  An And search of tag:entertainment* intitle:”so much” might get you what you want   

FYI, Boolean is more a combination of And (All) and Or (Any) at the same time.  With EN we only get one or the other at a time.  

Link to comment
 
Seriously, this is really perplexing and very counterintuitive!.
 
When I entered my search string I expected to get one title, because I knew, before I entered the search string, that there was only one title with that string in it. But I got 42 titles, including the one with the search string.  Why did I get the other 41, none of which contained the string?
 
I also don't get the Tags argument.  When I started the search the tags had all been selected and the titles were all listed.  I simply picked So Much as a test string to search on.
 
If, as you suggest, I "deselect the tags" all that would do is eliminate titles with the tags I deselect. If I deselected the "reading" Tag my search I would not have found So Much, if I deselected all the other tags So Much would have been found, but all the titles in "reading" would have still been displayed so instead of 42 titles I've have gotten 8.
 
If I am looking to find a needle in a haystack I want to clear away as much hay as possible.  This search result shows 42 titles that I must, manually, search through in order for me to locate the one that contains So Much. Why do I get so much hay?
 
In your example you got a single Title, I got 42 titles, and only one contained the search string.  I just don't see how you can say "that display is doing exactly what you've asked of it".  I thought I was asking it to deliver one title, the one title that contained my search string, to the elimination of any titles that did not contain that string; the "hay" in my analogy.
 
If I do an InTitle search for a string that is present in only one title out of 42 why do I get a list of 42 titles instead of one? 
Link to comment
20 hours ago, csihilling said:

In the above if all you want are notes with “so much” in the title, remove all the tags from the search.

The search as it exists is looking for notes with any of the tags or the phrase due to the Any term.  Switching to All would yield notes with all the elements, which would be none based upon what is visible of the tag structure.  An And search of tag:entertainment* intitle:”so much” might get you what you want   

FYI, Boolean is more a combination of And (All) and Or (Any) at the same time.  With EN we only get one or the other at a time.  

Thanks again for your response,

Why would I do that if  I want to find a string that exists in notes that have those tags? If I removed all the tags then I'd be searching the entire Default Notebook and might find my string in unrelated notes. What if I was looking for a recipe with Rice.  If I removed all the tags I might find 2 rice titles, one with a wine tag and another with a cooking tag.  I narrow my search by selecting the cooking tag and get only one find.  I know my Wine tag has rice titles but I don't want wine results I want recipe results.

But I don't understand how this argument is relevant to my issue, tags or no tags, All or Any, I got 42 Title listings and only one had the search string.  It seems to me that if I switched to All or Any my results would have been the same since there was only one title with my search string in it. 

It seems to me that if I'd removed all the tags I might have gotten hundreds of unrelated titles, instead of just 42.

 

When I enter a search string prefaced by Intitle: aren't I searching for "titles", not notes, that contain the search string?  In Gazumped's example, he got a single Title and I got 42 and only 1 had the search string, how is that a helpful result? Imagine how many titles I'd have gotten if I'd removed all the tags!

Tag:entertainment*intitle:"so much" (I'm assuming the asterisk means to search all the kids) may be the answer but it's not very intuitive, and I wonder if I would have still gotten the 42 titles, I'll have to test it.  But why doesn't Intitle:"so much" work just as well.  It's certainly more intuitive and less complicated. But what if I'd wanted to search for that sting across all tags and I just selected the default notebook your Tag: option wouldn't be applicable, I'd have to use the Intitle: option, wouldn't I?

I still don't understand why the Intitle: option produces the results I get!

Link to comment
  • Level 5*

Hi again.  I can only repeat what I and @csihilling said before - that if you search for [intitle:"so much"] (without the square brackets) you'll get all the notes which include that specific phrase in the title.  There may be other occurrances in the body of the note but you shouldn't see those unless you remove the 'intitle:' from the search.  If there are other uses of that phrase in the title of a note,  you would have to find ways to refine your search by adding a longer phrase,  or more words.

If you search for a tag however,  you'll ALSO get all the notes that match that tag,  whether or not they have 'so much' in the title.  And if (as it seems from above) that you selected a parent tag and all the child tags of that parent,  you'll get a boatload of extra notes,  as you have demonstrated.

If you get far too many hits in a search term,  that's pretty much business as usual for any database.  What you need to do is edit titles,  add tags or refine your search terms until you get a 'reasonable' number of hits and can easily see the one(s) that you need.

If I know I'll be using a search more than once,  I may use a special tag just for my chosen hit(s),  or save a complicated search as a shortcut,  or add the search string to a project note so I can get back to the source material,  or generate a table of contents note if there are several source notes.  (That last may mean applying a temporary tag,  searching for that tag so my target notes are the sole result of the search,  then selecting all of those notes on a desktop so I can generate a ToC.)

Hope that helps... 

 

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

Why would I do that if  I want to find a string that exists in notes that have those tags?

Again, with your current tag structure the way to do that is to use tag:entertainment* intitle:"so much" in the search bar.  This will return any notes that have at least one tag that starts with entertainment and has so much in the title.  Your current search is finding any notes that have at least one of the tags or the phrase.  You aren't going to get what you want because the logic does not work that way, and wouldn't with any search engine.  

EN by default does an All search.  When you have Automatically select child tags in play the search gets changed to an Any.  That's a problem for what you are trying to do.  I would suggest going to Tools - Options - Navigation and unchecking Automatically select child tags.  This function is useless and even problematic in compound searches since true Boolean search does not exist in EN.

7 hours ago, mikecox39 said:

What if I was looking for a recipe with Rice.

 In this instance a search for rice, either in title or in general, in conjunction with tag:cooking would work for you (tag:cooking rice).  Unless the same parent child structure is used with your cooking tags.

7 hours ago, mikecox39 said:

But why doesn't Intitle:"so much" work just as well.

Again, this will work fine, excluding all the other tags from the search.  Sometimes I might do a search on intitle"whatever the text" and then add search terms or sort the results by tag to winnow and/or focus the results if there are too many in the first pass.  It is the combination of terms and Any/All that determines the result.  The Any with all the different tags and the text is what is generating your result.  It is just how it works.

Link to comment
On 9/25/2017 at 5:00 AM, gazumped said:

Hi again.  I can only repeat what I and @csihilling said before - that if you search for [intitle:"so much"] (without the square brackets) you'll get all the notes which include that specific phrase in the title.  There may be other occurrances in the body of the note but you shouldn't see those unless you remove the 'intitle:' from the search.  If there are other uses of that phrase in the title of a note,  you would have to find ways to refine your search by adding a longer phrase,  or more words.

If you search for a tag however,  you'll ALSO get all the notes that match that tag,  whether or not they have 'so much' in the title.  And if (as it seems from above) that you selected a parent tag and all the child tags of that parent,  you'll get a boatload of extra notes,  as you have demonstrated.

If you get far too many hits in a search term,  that's pretty much business as usual for any database.  What you need to do is edit titles,  add tags or refine your search terms until you get a 'reasonable' number of hits and can easily see the one(s) that you need.

If I know I'll be using a search more than once,  I may use a special tag just for my chosen hit(s),  or save a complicated search as a shortcut,  or add the search string to a project note so I can get back to the source material,  or generate a table of contents note if there are several source notes.  (That last may mean applying a temporary tag,  searching for that tag so my target notes are the sole result of the search,  then selecting all of those notes on a desktop so I can generate a ToC.)

Hope that helps... 

 

OK! I think I get it, finally! 
 
WRT tags.  It was my understanding that if a Tag is selected the search will be narrowed down to only Titles that have the selected Tag/s. If no Tag is selected the search will look in ALL or Any note in the selected Notebook.
 
But, after reading your second paragraph, it appears that including a Tag in the search delivers all the Titles with that Tag, as well as the search string!
 
I did that search, without the tags, and got 1 hit!  
 
That still seems counter-intuitive! 
 
Thanks for your patient effort to get me to understand this strange process.
  • Like 1
Link to comment
On 9/25/2017 at 9:10 AM, csihilling said:

Again, with your current tag structure the way to do that is to use tag:entertainment* intitle:"so much" in the search bar.  This will return any notes that have at least one tag that starts with entertainment and has so much in the title.  Your current search is finding any notes that have at least one of the tags or the phrase.  You aren't going to get what you want because the logic does not work that way, and wouldn't with any search engine.  

EN by default does an All search.  When you have Automatically select child tags in play the search gets changed to an Any.  That's a problem for what you are trying to do.  I would suggest going to Tools - Options - Navigation and unchecking Automatically select child tags.  This function is useless and even problematic in compound searches since true Boolean search does not exist in EN.

 In this instance a search for rice, either in title or in general, in conjunction with tag:cooking would work for you (tag:cooking rice).  Unless the same parent child structure is used with your cooking tags.

Again, this will work fine, excluding all the other tags from the search.  Sometimes I might do a search on intitle"whatever the text" and then add search terms or sort the results by tag to winnow and/or focus the results if there are too many in the first pass.  It is the combination of terms and Any/All that determines the result.  The Any with all the different tags and the text is what is generating your result.  It is just how it works.

I get it, finally!  Thanks for your determined effort to help me understand what I still believe to be a counter-intuitive process! (-:

  • Like 1
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...