Search bar advanced mode (NOT)

Started by ben, May 31, 2020, 11:22:58 PM

Previous topic - Next topic

ben

Hello,

could someone do me a favour and try a search term in the file window search bar?

The folder contains the name "John": "4_Images_John"

I have 291 files, all of them have the title "Johns images"
All except 8 files have the keyword: "_persons|Doc John"

When i use the value filter for "_persons|Doc John" i see 283 files -> OK
When i invert the value filter i see 8 files -> OK

When i use the file window search bar to search for "John" i see 283 files -> OK
When i use the file window search bar to search for "NOT John" i see 0 files -> Why? Shouldn't there be 8 files again?

The activated search bar options are: "keywords", "Advanced Search"

Thanks for your help
Ben

Mario

In a folder with 10 files, I add the keyword test to 9 files.
I set the search bar to "Keywords" and "Advanced".

Searching for
test
reveals 9 files.

Searching for
NOT test
reveals 1 file.

Works here.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

thrinn

#2
I tried it here also. But I get the Ben's results:

In a folder with 4 files, I add the keyword "test" to 3 files. So, searching for test should show 3 files, searching for NOT test should show 1 file.
I set the search bar to "Keywords" and "Advanced Search".

Searching for test shows 3 files => OK.
Searching for NOT test shows NO file => Not OK.

However, switching the search bar to "Frequently used tags", and searching for NOT test shows 1 file => OK.
Switching to "Frequently used tags" also shows 1 file => OK.

Is there any other option that could have an impact?

EDIT:
And I just discovered the following:
When I combine "Keywords" with an other option like "Description, Title, Headline" or "Filename", searching for NOT test shows 1 file => OK.
Thorsten
Win 10 / 64, IMatch 2018, IMA

Mario

#3
I shall make a note.

The search engine does not support Boolean operators at the beginning of the search pattern, unless this is documented (which I could not find in the IMatch help).
@Ben: Can you show me the documentation where it says that this is supported? I may have missed this.

Maybe a side effect of searching multiple features makes it work by accident.

NOT blah works when all files have at least a keyword (or are otherwise grabbed by the pattern).
Searching for "NOT beach" (in keywords) also excludes all files without any keyword - although these files should theoretically be included as matches.
That's how the search engine works and why patterns starting with a Boolean operator are not supported.

You can use the Filter Panel to achieve this.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ben

Quote from: Mario on June 01, 2020, 10:56:17 AM
The search engine does not support Boolean operators at the beginning of the search pattern, unless this is documented (which I could not find in the IMatch help).
@Ben: Can you show me the documentation where it says that this is supported? I may have missed this.
No, this is not documented. I just tried it.
I added keywords and wanted to quickly check if i covered all files.


Quote
I shall make a note.
Yes, would make sense. I read the help before i posted.


Quote
Maybe a side effect of searching multiple features makes it work by accident.
You can use the Filter Panel to achieve this.
Ok, will do that.
Thanks for trying.

ben

I checked the helpfile one more time.
Maybe it could be improved independently of my other comment.

Have a look at the section "The AND/NOT Mode".
https://www.photools.com/help/imatch/#searchengine.htm?dl=h-13

You first write:
"By default, the search engine applies the Boolean operators to the same tag"

Then you write a bit below:
"AND (and NOT) are special because how they are to be applied depends on the results you expect."
"This will give you all files which contain both words at least once, even if the one word is in the keywords and the other in, say, the copyright statement"


This is all written in the section "The AND/NOT Mode", which i found confusing even reading it a second time.

For me, searching for "text-in-description AND text-in-keyword" (without " signs) returns all files, where both texts are included.
This would also be my expectation.


Ben

Mario

Please use the "Feedback link" available at the bottom of each help page if you find a typo, mistake or missing info.
This automatically queues help update requests and makes things simpler for me. I process all feedback requests every two or four weeks.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ben


Mario

I have added an extra "Note!" box to make it clear that expressions starting with NOT are not supported.
Since the search bar works that way since IMatch 5 I don't think many users will see this as an issue.

In addition, I've implemented a feature from my to-do list: "Invert Result" for the File Window search bar.
If you enable the Invert Result option (in the drop-down menu for the search bar), the result of the search bar is inverted.
This is a more flexible solution, I believe.

You can now search for test to find all files containing test somewhere. And when you enable the new Invert Result option, you get all files not containing test. Like inverting the Filter panel.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

Invert result! A very useful option. Thanks.