akimbo 4 Posted February 23, 2011 Share Posted February 23, 2011 Hi,I know I can search for a phrase within a note *title* using the structure intitle:"a specific phrase"But as far as I can tell, I can't search for "a specific phrase" in the note body. Entering "a specific phrase" in the search bar yields, according to the API documentation, a search for "a" and "specific" and "phrase" -- which returns lots of unwanted results, since it doesn't matter where the words occur, or how often. Could we have a modifier that parallels the "intitle:" modifier, like "innote:" or "innotebody:" or some other way to search for a specific string in the body of a note?Thanks,DougEDIT: I'm wrong -- enclosing the phrase in quotations does search it as a phrase. Read the replies to see. Link to comment
Level 5 jbenson2 2,149 Posted February 23, 2011 Level 5 Share Posted February 23, 2011 I just ran a test with the following line in the body of a note:this is a teat a specific phrase this is a testI searched for "a specific phrase" and this note is the only one that came up.When I removed the quote marks, many other notes came up. Link to comment
BurgersNFries 2,407 Posted February 23, 2011 Share Posted February 23, 2011 But as far as I can tell, I can't search for "a specific phrase" in the note body. Entering "a specific phrase" in the search bar yields, according to the API documentation, a search for "a" and "specific" and "phrase" -- which returns lots of unwanted results, since it doesn't matter where the words occur, or how often. If you search for "a specific phrase" and do not enclose it in quotes, you will get the behaviour you describe above. If you enclose it in quotes, it will find only the notes that have that exact phrase in it. It's not limited to the note body, though. IOW, if that exact phrase exists in the title of a note only, that note will still be in the results pane. Link to comment
akimbo 4 Posted February 23, 2011 Author Share Posted February 23, 2011 Yep, you're right. Rereading the API documentation, it's clear: "San Francisco" o matches: "The hills of San Francisco" o does not match: "San Andreas fault near Francisco winery" I think what threw me is the way EN shows both the search string and the individually matched words in the search results... even when they're not together: Confusing! Thanks for clearing this up. Link to comment
Level 5 jbenson2 2,149 Posted February 23, 2011 Level 5 Share Posted February 23, 2011 Yeah, it is confusing. You are probably using a Mac. It's stranger with Windows. With Windows, the words are correctly highlighted (if there are no quotes). But if there are quotes, the highlighting of the phrase completely disappears. Link to comment
engberg 89 Posted February 23, 2011 Share Posted February 23, 2011 Yes, the grouping that the Mac client does for the actual search against your database is unfortunately not exactly the same it uses for highlighting matches within a note. We have a bug filed on this to make it more consistent. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.