Jump to content
John Endahl

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

Share this post


Link to post

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?

Share this post


Link to post

-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 :)

Share this post


Link to post

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

Share this post


Link to post

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.

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...