Jump to content
jyc23

What do these options do? "Match by prefix ..."

Recommended Posts

I'm looking at two options in the Windows client that I can't figure out the function of.

"Match notebooks by prefix in the Notebook Picker"

"Match tags by prefix in the Tag Picker"

I've turned them on and off but I can't see any difference in any notebook search or tag search. What am I missing?

Share this post


Link to post

Okay, I figured it out. The CTRL-Q search seems to always NOT match by prefix. In contrast, the "add tag ..." search seems to always search by prefix. Confusing, inconsistent behavior. 

Share this post


Link to post

I came here today to search for an answer to this very question, about the difference between this option being on or off.  What does "Prefix" mean in this context?  I assumed it meant that if this feature was turned on, the notebook picker would match a string only if it began a notebook's name so that "Family" would find the notebook "Family and Friends" but not the notebook "My Wife's Family," but that doesn't seem to be the case.

Share this post


Link to post

"Match notebooks by word prefix in the Notebook Picker":

The notebook picker is invoked in at least three places that I can think of off the top of my head: the Copy Note command, the notebook dropdown in the note editor, and the notebook dropdown in the multi-select panel. If the option is enabled, then when you type into the edit control, matches are presented by matching the on first part of words in notebook titles (this is what the "prefix" bit refers to). Example: if I have  a notebook "Imported Notes", then to match it, I can type either (e.g.) "imp" or "no", etc. If I type "port" then that won't match this notebook name. On the other hand, if the option is disabled, then "port", "ote", ect. will also match. I verified this just now in version 6.14.14.

With respect to the tag picker, more or less the same deal. Exercise left for the reader to verify...

Edit: To be more specific to the given example, "prefix" refers to prefixes of words (i.e., space, and possibly delimiter separated characters) in a notebook or a tag name. So "My Wife's Family" consists of three (or maybe four; needs verification) words, and characters types in a note picker are matched against the words in a notebook name, not the name itself.

  • Like 1

Share this post


Link to post

Thank you, @jefito!  "Prefix" is certainly the wrong terminology here.  But at least I understand now. :)

Share this post


Link to post

You're welcome. I do think that "prefix" is appropriate; it's just what the prefix refers to. I can't think of a better term anyhow...

Share this post


Link to post

I'm with @RobertJSawyer. A "prefix" is a separable element (e.g., the "pre" in "prefix," or perhaps better in "pre-dawn"). "First parts of words" are not the same as "prefixes": "imp" and "no" in "Imported Notes" are not prefixes, since they are not separable constituents of "imported" and "notes." Admittedly, knowing a smidgen of linguistic terminology makes this distinction more obvious; but it's a really widespread smidgen, I think (if that makes any sense). Calling the option something like "Match notebooks/tags by beginning of name..." would IMHO be much clearer. The flyover help tips, which speak of "a word prefix instead of a substring," would also need to be changed. IMO (note absence of "H"), those tips are what happen when you let computer programmers try to write something other than computer programs. Bring in the English majors! 📚

  • Like 1

Share this post


Link to post

@Dave-in-Decatur: exactly!  You beat me to it.  "Antihistamine" has a prefix; "Allergy medicine" doesn't. ;) What Evernote is doing is matching the beginning of a word, versus matching a string anywhere in a word.

  • Like 1

Share this post


Link to post
4 minutes ago, RobertJSawyer said:

@Dave-in-Decatur: exactly!  You beat me to it.  "Antihistamine" has a prefix; "Allergy medicine" doesn't. ;) What Evernote is doing is matching the beginning of a word, versus matching a string anywhere in a word.

And that, I think, is what should be in the flyover tips, which are allowed to be a little more verbose than the option names.

Share this post


Link to post
3 hours ago, jefito said:

I can't think of a better term anyhow...

On 7/5/2018 at 9:56 PM, jefito said:

first part of words in notebook titles

😜

 

  • Haha 1

Share this post


Link to post
2 hours ago, RobertJSawyer said:

@Dave-in-Decatur: exactly!  You beat me to it.  "Antihistamine" has a prefix; "Allergy medicine" doesn't. What Evernote is doing is matching the beginning of a word, versus matching a string anywhere in a word.

 

2 hours ago, Dave-in-Decatur said:

I'm with @RobertJSawyer. A "prefix" is a separable element (e.g., the "pre" in "prefix," or perhaps better in "pre-dawn"). "First parts of words" are not the same as "prefixes": "imp" and "no" in "Imported Notes" are not prefixes, since they are not separable constituents of "imported" and "notes." Admittedly, knowing a smidgen of linguistic terminology makes this distinction more obvious; but it's a really widespread smidgen, I think (if that makes any sense)

 

Sorry; we in the programming word use "prefix" as a general term to indicate any substring at the front of a string, rather than in its more technical grammatical/linguistic sense; see, e.g., https://en.wikipedia.org/wiki/Substring.  It's typical of what developers do; take normal words (e.g., "stack", "notebook", "file", "directory", "folder", "window", "mouse" and countless others) and use them to describe things that have a precise reality in their world, and not to mention that the new meanings frequently get adopted as legitimate, without much struggle. And it's not like most people are grammarians anyhow. So let's be a little less prescriptive, and open the door for a term that has a precise meaning in its realm (where Evernote lives). And let's face it; where else in Evernote is grammar taken into account? About the only thing I can think of is 'stop words', words that are ignored in searches.

 

1 hour ago, CalS said:

 

  4 hours ago, jefito said:

I can't think of a better term anyhow...

  On 7/5/2018 at 10:56 PM, jefito said:

first part of words in notebook titles

😜

Haha - I did mean a simple term, not its description, and "prefix" fills the bill perfectly here, as far as I'm concerned.

Share this post


Link to post
3 hours ago, Dave-in-Decatur said:

Calling the option something like "Match notebooks/tags by beginning of name..." would IMHO be much clearer.

Oh yeah; missed this. It might be clearer, but it wouldn't be correct; what's really happening is that the options match notebooks/tags by beginnings of words in the name.

Share this post


Link to post
59 minutes ago, jefito said:

Sorry; we in the programming word use "prefix" as a general term to indicate any substring at the front of a string, rather than in its more technical grammatical/linguistic sense; see, e.g., https://en.wikipedia.org/wiki/Substring.  It's typical of what developers do; take normal words (e.g., "stack", "notebook", "file", "directory", "folder", "window", "mouse" and countless others) and use them to describe things that have a precise reality in their world, and not to mention that the new meanings frequently get adopted as legitimate, without much struggle. And it's not like most people are grammarians anyhow. So let's be a little less prescriptive, and open the door for a term that has a precise meaning in its realm (where Evernote lives). And let's face it; where else in Evernote is grammar taken into account? About the only thing I can think of is 'stop words', words that are ignored in searches.

Sorry for being prescriptive, Jeff. I appreciate that insight into this specialized meaning of "prefix," especially the Wikipedia link, which lays the usage out quite clearly. Frankly, I think you or someone in that world should send this in to Webster's; the Unabridged, and even the Collegiate (which is more frequently updated online), are still unaware of it (Unabridged [subscription required]: "a sound or sequence of sounds or in writing a letter or sequence of letters occurring as a bound form attached to the beginning of a word, base, or phrase and serving to produce a derivative word or an inflectional form — compare affix, infix, suffix" (emphasis added); Collegiate definition here).

But where I'd really differ from you is this: I don't think that Evernote "lives" in the computer-programming realm. It was born there (and congrats to the proud parents!); but it has grown up, moved out, and gone to college, gotten a job, and bought a house. It really lives in the daily lives of its users in those realms of school, work, and household. And in those realms (even though they are not populated by grammarians, I grant you), I suspect that the Webster's definition of "prefix" is more commonly understood than the programmers' usage. I'm willing to stand corrected. We may need to take this up with the language geeks at A Way with Words. But I think we've got this thread because most users of Evernote (apart from its developers and their programming colleagues) would not read "prefix" and understand 

56 minutes ago, jefito said:

beginnings of words in the name

(I definitely stand corrected in that regard).

Share this post


Link to post

Sorry, @jefito, but Evernote is not obeying even your definition.  At the link you provided it says, "A proper prefix of a string is not equal to the string."  Create two notebooks:  one called "Bookstore" and another called "Books", then, with "Match notebooks by word prefix" turned on, search notebook names for "Books".  By your definition, Evernote should only match "Bookstore" but not "Books" but in fact it matches BOTH.  It is NOT searching on the prefix (in either the programming or grammatical sense); it is doing precisely as I said: searching from the beginning of words.

All best wishes.

Share this post


Link to post

EN is searching the first characters of the different strings that make up a compound tag/notebook name when this option is set.  Prefix probably isn't the best moniker (tough to have three prefixes in a name as in the three in my.notebook.name, hard to see two of them as pre anything).  Though, first characters of the different strings that make up a compound tag/notebook name doesn't exactly roll of the tongue.

Share this post


Link to post

 

4 hours ago, RobertJSawyer said:

Sorry, @jefito, but Evernote is not obeying even your definition.  At the link you provided it says, "A proper prefix of a string is not equal to the string."  Create two notebooks:  one called "Bookstore" and another called "Books", then, with "Match notebooks by word prefix" turned on, search notebook names for "Books".  By your definition, Evernote should only match "Bookstore" but not "Books" but in fact it matches BOTH.  It is NOT searching on the prefix (in either the programming or grammatical sense); it is doing precisely as I said: searching from the beginning of words.

Sorry, but you've pretty much misunderstood me, and evidently the intent of a prefix search. in the programming sense (the grammatical sense would be pretty much useless for most users, and we've pretty much already dispensed with the notion that that's what prefix search means here) 

I never said anything about "proper" prefixes; that's some fallout from someone else's (i.e., not mine) mathematical definition of prefixes; the general idea was to cite an existing use of the technical term "prefix". Nobody ever said that Evernote was only matching proper prefixes -- that's something you made up. In fact. Evernote is matching any prefix, proper and non-proper, and that's perfectly valid: a non-proper prefix is still,  by definition, a prefix. The example that you give here is exactly what I would expect Evernote to do with a word prefix search, and even more importantly, it's exactly what I would want it to do. It would be dumb user-confusing if you typed "Books" and it didn't match a notebook named "Books"; into the bargain, you also get a match with "Bookstore" which is also useful (and why they added this option).

Evernote IS searching on the prefix, in the programming sense, as I've explained it previously.

Share this post


Link to post
39 minutes ago, CalS said:

Prefix probably isn't the best moniker (tough to have three prefixes in a name as in the three in my.notebook.name, hard to see two of them as pre anything).

Not even sure what you mean by this. Are you talking about a notebook name like "my.notebook.name"? It has 16 prefixes that would match it (discounting capitalization, and with the discovery that '.' is not a word separator for Evernote's  matching purposes): "m", "my", "my.", "my.n" ... up to "my.notebook.name" (the improper prefix). I'm confused...

Share this post


Link to post
21 hours ago, Dave-in-Decatur said:

But where I'd really differ from you is this: I don't think that Evernote "lives" in the computer-programming realm. It was born there (and congrats to the proud parents!); but it has grown up, moved out, and gone to college, gotten a job, and bought a house. It really lives in the daily lives of its users in those realms of school, work, and household. And in those realms (even though they are not populated by grammarians, I grant you), I suspect that the Webster's definition of "prefix" is more commonly understood than the programmers' usage. I'm willing to stand corrected. We may need to take this up with the language geeks at A Way with Words. But I think we've got this thread because most users of Evernote (apart from its developers and their programming colleagues) would not read "prefix" and understand 

Evernote certainly lives in the computer programming realm. It IS software.  Programming is done on Evernote nearly every day. But that's besides the point. The origin of the use of "prefix" here almost certainly came from the Evernote developers, as opposed to say, the marketers (no offense to marketing folks, some of my best friends ... er ... :) ). It is a technical term for sure, and if I used in front of my co-workers, they'd all understand it. In the non-developer world, sure, things are different. While it's awfully fun to conjecture about what most people will do or believe (and my addition to that is that most haven't even noticed this; heck, I'd bet that most people can't give a good definition of "prefix" in its grammatical sense either, though this is neither here nor there), I think that the answer to any confusion that people might have is being clear, as was suggested earlier: 

Use "word prefix" in the options, as it is now. It's crisp and has a precise meaning. Beef up the hover text to clarify what "word prefix" matching means, particularly vs. "substring" matching (which is evidently the default, and is actually equivalent to "name prefix" search).

Share this post


Link to post
22 hours ago, jefito said:

Evernote certainly lives in the computer programming realm. It IS software.  Programming is done on Evernote nearly every day. But that's besides the point. The origin of the use of "prefix" here almost certainly came from the Evernote developers, as opposed to say, the marketers (no offense to marketing folks, some of my best friends ... er ... :) ). It is a technical term for sure, and if I used in front of my co-workers, they'd all understand it. In the non-developer world, sure, things are different. While it's awfully fun to conjecture about what most people will do or believe (and my addition to that is that most haven't even noticed this; heck, I'd bet that most people can't give a good definition of "prefix" in its grammatical sense either, though this is neither here nor there), I think that the answer to any confusion that people might have is being clear, as was suggested earlier: 

Use "word prefix" in the options, as it is now. It's crisp and has a precise meaning. Beef up the hover text to clarify what "word prefix" matching means, particularly vs. "substring" matching (which is evidently the default, and is actually equivalent to "name prefix" search).

I think I've run out of contributions here. That would be a workable solution (in the unlikely event that this thread makes its way into the development process). I still maintain ("still," so this is not a new contribution!) that software options need to communicate with their users more than their developers, so that developers need to be aware when they're using in-group terminology that might not carry the same meaning elsewhere.

Share this post


Link to post
1 hour ago, Dave-in-Decatur said:

I still maintain ("still," so this is not a new contribution!) that software options need to communicate with their users more than their developers, so that developers need to be aware when they're using in-group terminology that might not carry the same meaning elsewhere.

No doubt, software options need to be clear to users when technical, abbreviated, or ambiguous language is used (as is often the case in UI). It's less a case of developers communicating to developers though, and more of a case that developers do often live in their own linguistic subset (as with most any specialized field), so technical terms can and often do bubble up to users unwittingly -- they may not even realize that it's a specialized usage. In this case, I'd have never hit on this being the grammatical meaning of "prefix", partly because of familiarity with the substring usage, and partly because I'm reasonably certain that absolutely nobody would want prefix filtering on tag or notebook to be the grammatical type. In the context of what this feature is intended for (to filter notebook or tag names), to have it match on grammatical prefixes would just be weird and pretty much useful to no-one. 

  • Like 1

Share this post


Link to post

I think the source of confusion here is really that the default behavior, infix search, is a superset of prefix search. That is, searching "term" searches "*term*", while the prefix option removes the initial wildcard, "term*". But I can sympathize with whoever wrote the description for that option, because it's not really that easy to explain without an example.

  • Like 2

Share this post


Link to post
On 7/8/2018 at 1:28 PM, jefito said:

Not even sure what you mean by this. Are you talking about a notebook name like "my.notebook.name"? It has 16 prefixes that would match it (discounting capitalization, and with the discovery that '.' is not a word separator for Evernote's  matching purposes): "m", "my", "my.", "my.n" ... up to "my.notebook.name" (the improper prefix). I'm confused...

Wow, I swore I replied to this yesterday. Anyway, my example shows how often I use compound tags, and when I do I use . as a separator so as to not have to quote searches.  Hopefully clearer, My notebook name has three "prefixes" in it if I'm following EN rules.  One starts with m and two start with n.  Semantically I'm hard pressed to view name as a prefix.  A prefix is the equals sign, =, I put on the front of all my person tags.  Must be a personal thing.

I am with @rezecib, ain't no easy way to splain this one.

Share this post


Link to post
On 7/9/2018 at 9:05 PM, rezecib said:

I think the source of confusion here is really that the default behavior, infix search, is a superset of prefix search. That is, searching "term" searches "*term*", while the prefix option removes the initial wildcard, "term*". But I can sympathize with whoever wrote the description for that option, because it's not really that easy to explain without an example.

Interesting -- I missed that the default was infix (which you correctly denote as *term*), believing it to be prefix of the entire name (which would be term*).  So if you had a notebook named "My Notebook", you'd get a match on terms "my", "y", "y n", "oteb", etc.

However, enabling the "prefix option" doesn't implement term* but it implements a more complicated search, one that can't be described using wildcards (I think); you'd need a regular expression, which I will leave as an exercise for the reader 😀. The search splits up the name into space-delimited words, and then term* is applied to the individual words; if a match is found, then the name is added to the candidate list. It's kind of explained in the hover text, but not clearly. In the case of a name like "My Notebook", you get a match on "My", and "Not", but not "y" or "y n".

So yeah, explaining it is a little awkward, but possible. I'd take as an example, the "Matching Literal Terms" section of the search grammar doc: https://dev.evernote.com/doc/articles/search_grammar.php

Share this post


Link to post
On 7/9/2018 at 11:07 PM, CalS said:

Wow, I swore I replied to this yesterday. Anyway, my example shows how often I use compound tags, and when I do I use . as a separator so as to not have to quote searches.  Hopefully clearer, My notebook name has three "prefixes" in it if I'm following EN rules.  One starts with m and two start with n.  Semantically I'm hard pressed to view name as a prefix.  A prefix is the equals sign, =, I put on the front of all my person tags.  Must be a personal thing.

I am with @rezecib, ain't no easy way to splain this one.

OK, I see now.

That being said, "My Notebook Name" doesn't have three prefixes; in terms of this discussion, it's composed of three words, "my", "notebook", and "name" (because of the space delimiters), each of which can be matched using a prefix search (term* as @rezecib puts it), if you have the option enabled. The point is that a prefix is any substring of another string (like a notebook name, or the individual words that comprise it) that begins from the string's first character. So you'd get a match on "my notebook name" for prefixes like "my" (an improper prefix, boo), "no", or "na" (proper prefixes). . The spaces don't matter if the option is disabled; you get an infix search (*term*) instead.

I haven't tested this much with special characters like "=' or '.' or '@' or whatever; they may figure into the part where a name is split into words. But ultimately the idea is the same.

Share this post


Link to post
1 hour ago, jefito said:

The point is that a prefix is any substring of another string

No biggie. but herein is where we semantically differ.  I think of prefixes as something repeated that is added to front of a word like un, dis or co.  What EN is doing is matching the first letters of the words in a notebook name or tag.  <shrugs>

Funny thing is if you use periods to separate words in tag names, when prefix search is on you only get tags that start with the search string (makes sense).  If you turn prefix search off, you get the equivalent of having it on since the periods are ignored in the search.   Just a factoid.

Share this post


Link to post
37 minutes ago, CalS said:

No biggie. but herein is where we semantically differ.  I think of prefixes as something repeated that is added to front of a word like un, dis or co.  What EN is doing is matching the first letters of the words in a notebook name or tag.  <shrugs>

And I thought that we had dispensed with this already. "Prefix" as used in the second case has a well-established meaning in the tech world (which intersects with the world of people who build Evernote). You may wish that the grammatical meaning was being used when discussing "prefix" as Evernote uses it, but that's not the meaning that they're using (and indeed, I think that it would be weird if they did). It's not a matter of you and me having semantic differences: both meanings exist already, and both are entirely valid. Now it's just a matter of applying the appropriate meaning of "prefix" to the current context.  The grammatical meaning makes no practical sense with respect to the UI task of filtering notebook or tag names; all that really matters is how to match characters that the user types into the filter.

So yes, what they're doing is indeed matching the first letters of words in a name, and it's perfectly reasonable call it "prefix matching".

Share this post


Link to post

 Horses for courses  😀

Share this post


Link to post

<shrug> It's how the world works; in natural languages, context is often critical to determine meaning. This is just one case...

Share this post


Link to post
6 hours ago, jefito said:

That being said, "My Notebook Name" doesn't have three prefixes; in terms of this discussion, it's composed of three words, "my", "notebook", and "name" (because of the space delimiters), each of which can be matched using a prefix search (term* as @rezecib puts it), if you have the option enabled. The point is that a prefix is any substring of another string (like a notebook name, or the individual words that comprise it) that begins from the string's first character. So you'd get a match on "my notebook name" for prefixes like "my" (an improper prefix, boo), "no", or "na" (proper prefixes). . The spaces don't matter if the option is disabled; you get an infix search (*term*) instead.

Yeah, I believe it's searching the tokens extracted from the string, not the original string. Which I understand is pretty confusing considering that notebook names are treated by the main search as a keyword (that is, not tokenized). But this behavior is local to the Windows client as far as I know, so I don't know exactly what it's doing.

I would consider this use of "prefix" to be search-specific jargon with some loose relation to the normal word's meaning.

  • Thanks 1
  • Haha 1

Share this post


Link to post
3 hours ago, rezecib said:

I would consider this use of "prefix" to be search-specific jargon with some loose relation to the normal word's meaning.

I would vote for you!!!  😉

Share this post


Link to post
3 hours ago, rezecib said:

Yeah, I believe it's searching the tokens extracted from the string, not the original string. Which I understand is pretty confusing considering that notebook names are treated by the main search as a keyword (that is, not tokenized). But this behavior is local to the Windows client as far as I know, so I don't know exactly what it's doing.

Sure -- this functionality isn't a part of the search query mechanism (which in the Windows client has its own special behaviors, e.g. the "Automatically select child tags" behavior); these options don't affect search. They are just used to filter lists of notebook or tags names down, responding to a user's typed input. How it's done is not all that important; maybe they explicitly tokenize the names, maybe they build a regex to match with, or maybe they just scan by hand. It's not exactly rocket science and doesn't need to be as efficient as, say, document search (since it has a relatively small N), but it's certainly useful. Provided the user understands the rules, of course...

But then again, isn't it ironic that the "suf" in "suffix" is a prefix???

  • Like 1

Share this post


Link to post
On 7/11/2018 at 7:50 PM, rezecib said:

I would consider this use of "prefix" to be search-specific jargon with some loose relation to the normal word's meaning.

Yes, that sounds about right. Most jargon (and I've worked in a highly technical, non-technological field with some unbelievable jargon) has its origins in "normal words" that acquire specialized meanings generally better known to the specialists than the public at large.

On 7/12/2018 at 11:19 AM, jefito said:

But then again, isn't it ironic that the "suf" in "suffix" is a prefix???

:D

Share this post


Link to post

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

×