Page 1 of 1

nopath: doesn't override menu option to "Match Path"

Posted: Thu Apr 20, 2017 5:11 am
by thinline
With version 1.4.1.869b, I have "Match Path" selected in the Search menu. When I use nopath: in a search I would expect that this would override the menu option and I shouldn't get any results where the search string is only found in the path. This doesn't happen - I have entries that only match in the path. The search I used is, "namepartdupe:foo file: nopath:"

Am I using this incorrectly?

Re: nopath: doesn't override menu option to "Match Path"

Posted: Thu Apr 20, 2017 5:31 am
by void
namepartdupe: is a function that takes no parameters.
nopath: is a modifier and is only applied to the term that follows immediately.

Everything interprets namepartdupe:foo file: nopath: as:
(namepartdupe:) AND (files and folders containing foo) AND (files only) AND (files and folders matching an empty string -with no path matching enabled)

Please try searching for:
file: nopath:foo namepartdupe:

file: = file results only
nopath:foo = files and folders filename part containing foo
namepartdupe: = name part occurs in the index at least twice.

Re: nopath: doesn't override menu option to "Match Path"

Posted: Fri Apr 21, 2017 7:07 am
by thinline
Thanks, David - that makes it clear what I had wrong, but leaves me somewhat confused. For "nopath:foo", the description is kind of confusing because you say it finds "files and folders, filename part containing foo". If the filename part contains foo, but the path doesn't, and directories don't have a filename part, shouldn't this alone not return any directories? In my mind, anything not a file is part of a path. The description for "nopath:" then, would suggest that "file:" is not needed.

Re: nopath: doesn't override menu option to "Match Path"

Posted: Fri Apr 21, 2017 7:50 am
by void
Folders have a filename and path too.

Think of it this way, nopath:foo matches files and folders with the name (including extension for files) containing foo