Content not matching, but spotlight successfully matches

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Hi,

I'm a new user of Hazel and its mostly working out ok, but I've got one rule which refuses to match a file.

I have the rule setup to search for a string in the file. When using spotlight, or the search in Preview.app the content is found, but nothing seems to make the Hazel rule work.

Is there anything I can do to further debug this? Its quite a pain that it fails to match the content of one of the first rules I've added!

I shot a video showing mdfind picking up the file, but Hazel not finding it which can be seen here https://www.dropbox.com/s/ffyj8iudchsn4mf/Hazel%20possible%20bug.mov?dl=0 You'll have to hit download directly to see a version which is readable.

I've got a snipped of the debug log here:

Code: Select all
 Marker - 30 Jan 2015 09:49:17
2015-01-30 09:50:53.526 HazelHelper[380] DEBUG: Thread 0x60800007ba80: Run worker for folder: /Users/robin/Dropbox/Scanbot
2015-01-30 09:50:53.548 hazelworker[1241] ###main load address: 0x10c091000
2015-01-30 09:50:53.549 hazelworker[1241] ###Noodle load address: 0x10c1a1000
2015-01-30 09:50:53.549 hazelworker[1241] ###CK load address: 0x10c166000
2015-01-30 09:50:53.557 hazelworker[1241] DEBUG: Program is licensed.
2015-01-30 09:50:53.566 hazelworker[1241] DEBUG: Unexpected type for Mail download URL: (null)
2015-01-30 09:50:53.569 hazelworker[1241] DEBUG: Could not scan past browser.download.dir preference
2015-01-30 09:50:53.574 hazelworker[1241] DEBUG: Could not find entry for default_directory in Chrome preference file.
2015-01-30 09:50:53.578 hazelworker[1241] Processing folder Scanbot (forced)
2015-01-30 09:50:53.578 hazelworker[1241] DEBUG: Initialized
2015-01-30 09:50:53.578 hazelworker[1241] DEBUG: Pausing to wait for things to settle down.
2015-01-30 09:50:55.676 hazelworker[1241] DEBUG: Processing directories: (
    "/Users/robin/Dropbox/Scanbot"
)
2015-01-30 09:50:55.678 HazelHelper[380] DEBUG: Checking events for path /Users/robin/Dropbox/Scanbot, folder <ComNoodlesoft_HazelConcreteFolder: 0x60000026dd40> "Scanbot"
2015-01-30 09:50:55.679 hazelworker[1241] DEBUG: Received file event: {
    date = "2015-01-30 09:50:53 +0000";
    path = "<ComNoodlesoft_NoodlePathSet: 0x7facb240c830> - (\n    \"/Users/robin/Dropbox/Scanbot\"\n)";
}
2015-01-30 09:50:55.679 hazelworker[1241] DEBUG: About to process directory /Users/robin/Dropbox/Scanbot
2015-01-30 09:50:55.680 hazelworker[1241] DEBUG: .DS_Store: File is hidden/invisible. Skipping.
2015-01-30 09:50:55.786 hazelworker[1241] DEBUG: Doxie 0008.pdf: Did not match any rules.
2015-01-30 09:50:55.787 hazelworker[1241] DEBUG: Directory /Users/robin/Dropbox/Scanbot processed in 0.107511 seconds
2015-01-30 09:50:55.787 HazelHelper[380] DEBUG: Checking events for path /Users/robin/Dropbox/Scanbot, folder <ComNoodlesoft_HazelConcreteFolder: 0x60000026dd40> "Scanbot"
2015-01-30 09:50:55.788 hazelworker[1241] DEBUG: Sending metrics to scheduler. Next scheduled run:
2015-01-30 09:50:55.788 HazelHelper[380] DEBUG: Received metrics for folder /Users/robin/Dropbox/Scanbot: {
    directoryDepth = 18446744073709551615;
    requestedSchedulingTime = "";
    triggerPaths = "<ComNoodlesoft_NoodlePathSet: 0x61000003fa60> - (\n)";
    unavailablePaths = "{(\n)}";
}
2015-01-30 09:50:55.788 HazelHelper[380] DEBUG: Timer scheduled for folder /Users/robin/Dropbox/Scanbot at
2015-01-30 09:50:55.788 hazelworker[1241] Done processing folder Scanbot
2015-01-30 09:50:55.791 HazelHelper[380] DEBUG: Thread 0x60800007ba80: Task removed: [1241]
 Marker - 30 Jan 2015 09:51:11

rk295
 
Posts: 3
Joined: Fri Jan 30, 2015 5:46 am

Try using "contains match" instead and see if that works. It will be a tad slower but is much more reliable than Spotlight.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Wicked, many thanks for that tip. Worked first time.

Do you know what the difference is under the covers? Is that searching the PDF using Hazel rather than spotlight or something?
rk295
 
Posts: 3
Joined: Fri Jan 30, 2015 5:46 am

Being the developer, I think I may have an idea :wink:

When using "contains match", Hazel actually gets the text from the file directly instead of going through Spotlight. It's more reliable since it is scanning the whole text directly instead of depending on an index of the text created by Spotlight.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

lol, yes that would put you in a strong position to comment :)

Thanks for the explanation, seeing as I only process very few files I'll use the more reliable content match in future.

Its great software btw, I've got it scanning the output of my Doxie, bliss! :D
rk295
 
Posts: 3
Joined: Fri Jan 30, 2015 5:46 am

"contain match" FINALLY solved it for me!
gddbrvsky
 
Posts: 2
Joined: Thu Aug 28, 2014 9:57 pm


Return to Support