FoxTrot Search Forum
FoxTrot Search for macOS Forum

Home » Public Forums » FoxTrot Search User Forum » BUG: Unexpected behavior when using "Does not contain any of the strings"
BUG: Unexpected behavior when using "Does not contain any of the strings" [message #1529] Sun, 23 October 2022 07:56 Go to next message
Atlas
Messages: 130
Registered: August 2009
Senior Member
I want to search for files that contain the words "supply" and "demand", but not part of a folder called "‑‑ Inbox ‑‑", where the "‑" is a non-breaking hyphen and not regular hyphen. My search setup is the following:

(1) First criteria search use "Contents, any metadata or file name" -> Foxtrot Query -> Apply search string [supply demand].
(2) Second criteria use "Apply advanced filter" -> Full Path -> "Does not contain any of the strings" -> "Ignore Case"+"Ignore Composition"+"Multiple String"+Turn off all other options.
(3) I changed the default multiple string separator in advanced search to "," which is a comma with no space before or after.

Here are search results when I use different search term in the "Does not contain any of the strings" condition:

(1) If I use search term [‑], then the query DOES FILTER out the "‑‑ Inbox ‑‑" folder.
(2) If I use search term [‑‑], then the query DOES FILTER out the "‑‑ Inbox ‑‑" folder.
(3) If I use search term [Inbox ‑‑], then the query DOES FILTER out the "‑‑ Inbox ‑‑" folder.
(4) If I use search term [ ‑‑], then the query DOES FILTER out the "‑‑ Inbox ‑‑" folder.
(5) If I use search term [‑‑ ], then the query DOES NOT FILTER out the "‑‑ Inbox ‑‑" folder.
(6) If I use search term [‑‑ Inbox], then the query DOES NOT FILTER out the "‑‑ Inbox ‑‑" folder.

So the last two queries fail while the rest works, and I don't see why it would be expected behavior. First of all, my multiple string separator does not have space, and I can verify that it works as expected in all cases that I tested so far. Second, I've tried the above combinations with other folder names that also contain spaces, and they work just fine. Somehow it's the combination of search string starting with the character "‑" and containing a space that doesn't work. I don't understand the logic of why Query 5 and 6 fails when the rest works as expected.

Please let me know if this is bug. Thank you.

[Updated on: Mon, 24 October 2022 08:01]

Report message to a moderator

Re: BUG: Unexpected behavior when using "Does not contain any of the strings" [message #1534 is a reply to message #1529] Mon, 24 October 2022 14:26 Go to previous messageGo to next message
FoxTrot Engineering
Messages: 383
Registered: April 2020
Senior Member
I can't reproduce this issue, with a test index following exactly your description. The filter works in every case (as long as there is no extra space, nor hyphen-minus character instead of non-breaking hyphen, in the query).

Jérôme - FoxTrot Engineering
Re: BUG: Unexpected behavior when using "Does not contain any of the strings" [message #1535 is a reply to message #1534] Mon, 24 October 2022 22:54 Go to previous messageGo to next message
Atlas
Messages: 130
Registered: August 2009
Senior Member
Wait, I need to be clear. The point of this example is that my folder I'm trying to exclude DOES contain spaces and non-breaking hyphen. Did you test with that, and can you confirm again that you cannot reproduce under those conditions? I have Foxtrot running on two separate machines and I'm able to reproduce the phenomenon on both. Please confirm and I can send video or screenshot of what I'm seeing to help reproduce.

[Updated on: Mon, 24 October 2022 23:07]

Report message to a moderator

Re: BUG: Unexpected behavior when using "Does not contain any of the strings" [message #1540 is a reply to message #1535] Fri, 28 October 2022 17:11 Go to previous messageGo to next message
FoxTrot Engineering
Messages: 383
Registered: April 2020
Senior Member
I confirm this works as expected.
Maybe you have some text replacement substitution that replaces the sequence <non-breaking hyphen><non-breaking hyphen><space> by something else, or something like that? I Copied each of your string from your message.


Jérôme - FoxTrot Engineering
Re: BUG: Unexpected behavior when using "Does not contain any of the strings" [message #1543 is a reply to message #1540] Mon, 31 October 2022 06:39 Go to previous message
Atlas
Messages: 130
Registered: August 2009
Senior Member
Thank you for doing the follow-up testing. I ran another test with sample data, and the result seems to match your finding. At this point, I'm not sure what's causing the unexpected behavior.

Setup of Test 2

1. Created a folder structure that resembles the folder structure from the first test (in original post). Under my Dropbox folder, I created a folder called "[Folder]", and underneath that folder I created a sub-folder called "‑‑ Jot ‑‑". This has the same folder depth level as the first test, but with far fewer files in the folders.
2. I copied and pasted a markdown file with the word "XR" and "VR" in its content at the following locations: (1) One copy directly underneath the folder "[Folder]" (2) One copy directly underneath the folder "‑‑ Jot ‑‑"
3. Create a new index that index the folder path .../Dropbox/[Folder]
3. I then ran all of the 6 searches described in the first post using the new index to search for the words "XR" and "VR".
RESULT: They do give the same expected results, which successfully filter out search results from the folder "‑‑ Jot ‑‑".

At this point, I don't know what's causing the difference between the two tests other than the number of files that I have in the index. In the first test, I used an index with about 30K files, and in the second test I used an index with only 12 files. However, the difference between the two tests are repeatable, because I have two Macs and I've reproduced these test results on both (in the words, on both Macs I'm seeing different search results for the two tests). Something is causing a reproducible difference across my Macs, but I don't know what it is. Thanks for looking into it. I appreciate any help.

[Updated on: Mon, 31 October 2022 06:50]

Report message to a moderator

Previous Topic: Lost Indexes
Next Topic: Preview shows only plain text for pdf
Goto Forum:
  


Current Time: Thu Mar 28 13:42:11 GMT+1 2024