Jump to content

Search won’t succeed if query is surrounded by hyphens in file name


Recommended Posts

Hi there, 

 

I noticed many of my files weren't coming up in search, and it was bothering me for the longest time. I finally decided to spend some time to troubleshoot and narrow down the issue. I've concluded it has something to do with hyphens. Doesn't seem to happen with periods or underscores. However, most of my file nomenclature across my machine utilizes hyphens in this way.

 

When I'm trying to find a file based on a section of its name, it won't come up in Alfred's search results if that section happens to be sandwiched between two other file name sections. In other words, surrounded by a hyphen on each side.

 

Below are two screenshots that should be able to show what I'm talking about. Each screenshot should show three results.

 

Any idea what might be causing this? Fixing this would be a life saver.

 

Thanks in advance!

 

 

image.thumb.png.e9c2f57ba867ea5355cbcded9c3eaa87.png

 

 

image.thumb.png.4a411e6fa1f53285e5ad7c49c2237457.png
 

Link to post
Share on other sites
43 minutes ago, ryzor said:

Any idea what might be causing this? Fixing this would be a life saver.

 

Apple changed way the metadata search engine interprets hyphens. @Andrew might be able to give you some details.

 

I think you can work around it with asterisks (i.e. *DummyWord*), but that’s a pain :(

Link to post
Share on other sites

@ryzor Could you please provide more details as to which version of macOS and Alfred you're using?

 

I've just replicated your exact file names in Big Sur, and words are always found after a hyphen. As such, I'm wondering if you're either on an older OS (where Apple have set different specifications for their word boundary based search), or having indexing issues of some sort.

 

Having said that, it looks like you've either added jpgs to your default results, or turned on unintelligent search, which isn't optimal and is likely going to return a whole lot more results in your Default Results than is ideal.

 

You can pop your Diagnostics file (type "?diagnostics" into Alfred to get it) to our info@ address if you'd like me to take a look at that.

 

Cheers,
Vero

Link to post
Share on other sites

Thanks for the replies @deanishe and @Vero. Happy to use `*DummyWord` until we can figure out a long term solution.

 

For other software-/work-related reasons, I'm unable to upgrade to Big Sur just yet.

 

I'm on MacOS Catalina Version 10.15.7 (19H524). Will be sending you the diagnostics file asap.

 

A long time ago I did turn on unintelligent search for a reason I can't quite remember. I think there was a file type I often use that wasn't showing up on search.

 

Thanks again!

ryzor

 

 

Link to post
Share on other sites

@ryzor Thanks for sending your diagnostics across.

 

I've checked on our Catalina Mac, and get the same behaviour as I do on Big Sur; Using the same file names you used, the hyphen word boundary is fine and files with those names are found. (The results are the same if I enable unintelligent search) I also wondered if you might've been using some odd unicode character that looks like a hyphen, but macOS also doesn't seem to take issue with those.

 

Screenshot 2021-03-04 at 16.44.18.png

 

To start troubleshooting this, I would encourage you to first disable unintelligent search, as there are better ways to add a few specific files to your default results instead of bringing all files in. :)  Try using the File Search by prefixing your search term with a space (which is a shortcut for the "open" keyword and broadens your search.

 

Does this return the file you expect or not?

 

Let me know how you get on.

 

Cheers,
Vero

 

Link to post
Share on other sites

Hi @Vero,

 

Thanks for taking a look! Did those steps, with following same results for now. Also restarted Alfred. Happy to have you lead me through the next troubleshooting steps.

 

ryzor

 

image.png.c34f85b329a8f18602dcea9428d3f277.png

 

image.thumb.png.35a734fffef28e250f9804e9d9f1530a.png

 

image.thumb.png.cc8d6e20a979b35b70c614079cf00614.png
 

Link to post
Share on other sites

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
×
×
  • Create New...