Jump to content

(Archived) Feature request: search for "a specific phrase" within a not


Recommended Posts

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,

Doug

EDIT: I'm wrong -- enclosing the phrase in quotations does search it as a phrase. Read the replies to see.

Link to comment
  • Level 5

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 test

I 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
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

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:

20110223-8ppeb121epaa978797jqhg6we6.jpg

Confusing!

Thanks for clearing this up.

Link to comment
  • Level 5

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).

post-16734-131906071581_thumb.png

But if there are quotes, the highlighting of the phrase completely disappears.

post-16734-131906071583_thumb.png

Link to comment

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

Archived

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

×
×
  • Create New...