Jump to content

Alfred fails to find file contents that are found by Spotlight


Recommended Posts

Good day,

 

OK, I am trying to figure out why Alfred will not find a phrase in a pdf that Spotlight finds successfully. So far, I have done the following:

 

Confirmed that Spotlight can do the search successfully.

Using the "in" keyword in Alfred, verified that Alfred cannot do the search.

I've confirmed my Spotlight prefs are searching pdfs.

I've used the "rebuild Mac OS X metadata" from the Alfred control panel.

I've waited for the mdimport tasks to complete.

I've reset the Alfred search cache.

I've entered various terminal commands to rebuild the indices as well.

I've pulled out some of my hair and wasted hours of my life looking for additional solutions.

I've begun to think about sacrificing a spotless goat and sprinkling it's blood on my keyboard (OK, no I haven't..at least, not recently,)

 

I've worked on this issue on and off for about three months. I'm using Alfred 2.3 (264) without PowerPack, on Mavericks 10.9.3. At this point, I'm ready to seek professional help (both tech support and psychological). Any suggestions/tips/tricks would be greatly appreciated.

 

These links go to screenshots of:

The Spotlight search results

The Alfred search results

The Alfred search preferences

The Alfred results preferences

 

So, what am I missing??

 

Thanks for any help/counseling you can provide.

 

-->John

Link to comment

Good day,

 

OK, I am trying to figure out why Alfred will not find a phrase in a pdf that Spotlight finds successfully. So far, I have done the following:

 

Confirmed that Spotlight can do the search successfully.

Using the "in" keyword in Alfred, verified that Alfred cannot do the search.

I've confirmed my Spotlight prefs are searching pdfs.

I've used the "rebuild Mac OS X metadata" from the Alfred control panel.

I've waited for the mdimport tasks to complete.

I've reset the Alfred search cache.

I've entered various terminal commands to rebuild the indices as well.

I've pulled out some of my hair and wasted hours of my life looking for additional solutions.

I've begun to think about sacrificing a spotless goat and sprinkling it's blood on my keyboard (OK, no I haven't..at least, not recently,)

 

I've worked on this issue on and off for about three months. I'm using Alfred 2.3 (264) without PowerPack, on Mavericks 10.9.3. At this point, I'm ready to seek professional help (both tech support and psychological). Any suggestions/tips/tricks would be greatly appreciated.

 

These links go to screenshots of:

The Spotlight search results

The Alfred search results

The Alfred search preferences

The Alfred results preferences

 

So, what am I missing??

 

Thanks for any help/counseling you can provide.

 

-->John

 

Could you provide the location of the files that are being found by Spotlight so that we can also confirm that that path matches a path listed in your Alfred scope?

Link to comment

-bump-

Does the new screenshot give you the information you needed? Can I provide anything further?

--> John

 

I've had a look at your screenshots and here's what I think is happening - keeping in mind I don't have access to your files to see their content.

 

For efficiency and accuracy, Alfred separates the way he searches depending on the keyword you use; The "open"/"find" keywords search filenames while "in" searches inside files.

 

Provided your metadata index is complete and healthy, which should be the case given the steps you've taken, my guess is that for this particular search, the word "auto" is in the file content but "insurance" is in the filename only. As such, if you use the "in" keyword to filter your search for "auto insurance" and only the word "auto" is in the file content, then your file won't appear.

 

With the Powerpack, you'd be able to replace the "in" keyword with a file filter workflow that does exactly what you want. If you upgrade to the Powerpack, do let me know and I'll create a workflow for you :)

Link to comment

Vero,

 

Thank you for the reply. I've verified that the exact words "auto insurance" are located within the pdfs I'm searching, and that I can double-click the words to select them, so I know the ODR has correctly parsed the text. You can see that in this screenshot.

 

Then, just to test your "auto" theory, I searched for the word "insurance". Surprisingly, it found the word in a pdf "User Guide" but did not find it in my intended documents. screenshot

 

I'd consider purchasing Powerpack, but if Alfred can't do the search manually, I'm uncertain it would find it with an added layer of automation.

 

Are there other, more brute-force methods I can try to clean up the Alfred database (or does Alfred directly query the dbimport files)? Perhaps a complete delete/re-install of Alfred?? A plist I can trash? 

 

--> John

Link to comment

Vero,

 

Thank you for the reply. I've verified that the exact words "auto insurance" are located within the pdfs I'm searching, and that I can double-click the words to select them, so I know the ODR has correctly parsed the text. You can see that in this screenshot.

 

Then, just to test your "auto" theory, I searched for the word "insurance". Surprisingly, it found the word in a pdf "User Guide" but did not find it in my intended documents. screenshot

 

Could you please try your searches without quotes around them? These aren't necessary in Alfred so let me know if you get your results without quotes. :)

 

Also, for avoidance of doubt and to confirm the file itself is being found, try pressing the spacebar (shortcut to the "open" keyword) and type "frankenmuth insurance" (without the quotes). This will at least confirm that the file itself can be found by Alfred based on file name.

Link to comment

Vero,

 

There just seems to be no rhyme nor reason nor pattern to this.

 

The "in insurance" search (without quotes) now finds exactly ONE pdf with the word insurance in there (even though there are dozens, many in the same folder as the Alfred result. BTW, the word "insurance" was also found in three other pdfs but they were not these "Frankenmuth" payment receipts.

 

The 'frankenmuth insurance' query found lots of files (as I would have expected), so the "Open file" search seems to be locating all the appropriate file names.

 

--> John

Link to comment

Vero,

 

There just seems to be no rhyme nor reason nor pattern to this.

 

The "in insurance" search (without quotes) now finds exactly ONE pdf with the word insurance in there (even though there are dozens, many in the same folder as the Alfred result. BTW, the word "insurance" was also found in three other pdfs but they were not these "Frankenmuth" payment receipts.

 

The 'frankenmuth insurance' query found lots of files (as I would have expected), so the "Open file" search seems to be locating all the appropriate file names.

 

--> John

 

Alfred is working as expected in these examples, you simply need to understand the differences between the way Alfred and Spotlight find and present files to you. With Alfred, the "in" keyword ONLY searches for files which contain the given words. The "open" keyword (or space prefix) only finds files by the filename. This gives much more control over the files you are finding. So in the examples you have given for Alfred:

 

in insurance - this finds all files containing the word insurance in the file's content

'frankenmuth insurance - this finds all files where the filename contains the words frankenmuth and insurance

 

Your original query example in Spotlight was in "auto insurance" which would have matched files which have matched the filename or content for the words in and "auto insurance"... Note that using the keyword "in" in Spotlight doesn't affect the search type like it does in Alfred, it just looks for the word "in" as part of your search.

 

If you were to type into Alfred the following Query:

 

in auto insurance

 

You would find all files containing the words auto and insurance in the content (in any order). This may more likely match the files you were expecting.

 

With the Powerpack, you can create very specific search queries which match the requirements you want, for example, you could have a keyword which only matches pdfs with certain words in the content or title in certain folders. This way, you could filter out all irrelevant search terms.

 

Cheers,

Andrew

Link to comment

Andrew,

I appreciate the clarification on the functionality within Alfred. I think I understood that properly.

The issue is, I know there are many files that have the words "Auto Insurance" in the file content. These are OCR-ed pdfs, and the files are located using Spotlight. But if I use the IN keyword in Alfred, the files are not located. The contents of these files do not seem to be searched properly in Alfred....but maybe I'm missing something.

--> John

Link to comment
  • 2 years later...

Still confused!

I have a file which content is like below:

you are a good_man
hello, welcome

Then I searched "good_man"(without the  quotes),  The Spolight can found it, like below.

but the alfred can't found it.

 

I really don't understand why. Can anyboday help me.

WX20170118-161415@2x.png

WX20170118-161602@2x.png

Edited by ghui
Link to comment
  • 2 years later...
48 minutes ago, tillus said:

Unfortunately, this still seems to be an issue. I cannot find pdf files that are found by spotlight. 😕

How are you searching ? Can you post a screen of you searching so we can see the results ?

 

when you bring up Alfred, do hit space first, so that it knows it’s searching for files ?

Link to comment
  • 2 weeks later...
On 12/27/2019 at 11:48 PM, Terminal said:

How are you searching ? Can you post a screen of you searching so we can see the results ?

 

when you bring up Alfred, do hit space first, so that it knows it’s searching for files ?

Sure. Its the same with find/open file keywords in alfred.

Sorry, saw your answer just now. I did not get a mail from the forum. Ill try to enable that now.

 

For example when I search the term 'edge' that is inside on of my files:

 

Screenshot 2020-01-05 at 13.27.47.jpg

Edited by tillus
Link to comment
47 minutes ago, tillus said:

For example when I search the term 'edge' that is inside on of my files:

 

As Andrew explained above, searching with ' only searches filenames, and searching with in only searches file content. So, you should be using in edge to search file contents for "edge".

Link to comment

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...