DanielChief

Q: AFP search in OS X Finder

Dear Apple Support Team,

 

We have a file search / indexing problem with our NAS. Mac OS X Finder cannot find some of our files, which are on the AFP shared NAS. However, it will found them when we click on "This Mac" and back to the NAS volume. Sometimes, we have to repeat these steps to get the files shown up.

 

For example, if I input "222" to the search bar, there are a lot of files in the results. Otherwise, if I input "2227", there are no results, even if we have files with that name. But, if I click on "This Mac" and "NAS Volume" back and forth, the results suddenly appear.

 

Indexing are enabled for the Volume in Synology DSM.

 

We are using Mac OS X 10.11.5, and DSM version 6.0.1-7393 Update 1 (Latest).

iMac, OS X El Capitan (10.11.5)

Posted on Jun 30, 2016 7:36 AM

Close

Q: AFP search in OS X Finder

  • All replies
  • Helpful answers

  • by Linc Davis,

    Linc Davis Linc Davis Jun 30, 2016 8:22 AM in response to DanielChief
    Level 10 (207,926 points)
    Applications
    Jun 30, 2016 8:22 AM in response to DanielChief

    This is not Apple Support; it's a peer-to-peer discussion forum hosted by Apple Support. If you want support from Apple, click the Support link at the top of this page.

    A search for a numerical string needs special handling.

    To search in the Finder for a file with the name "1234", please enter "name:1234" as the search term. To search for "1234" anywhere in a file, click the NAME token you just created, then select Everything from the menu that drops down.

    To search in Mail for a message with "1234" in the subject, enter "subject:1234" as the search term. To search for "1234" anywhere in a message, click the SUBJECT token you just created, then select Entire Message from the menu that drops down.

    To search in Calendar for an event with "1234" in the title, enter "title:1234" as the search term. To search for "1234" anywhere in an event, click the TITLE token you just created, then select Entire Event from the menu that drops down.

  • by DanielChief,

    DanielChief DanielChief Jul 1, 2016 2:38 AM in response to Linc Davis
    Level 1 (4 points)
    Mac OS X
    Jul 1, 2016 2:38 AM in response to Linc Davis

    Thank you for the answer. Yeah, firstly I tried Apple Support, but they redirected me here.

     

    Yes, I tried that method (name search). The problem is that Finder does not list every item of the chosen folder or volume. By the way, it works like this also with alphabetic strings, not just numerical ones. Do you have any idea?

     

    Sincerely, Daniel

  • by Linc Davis,

    Linc Davis Linc Davis Jul 1, 2016 8:34 AM in response to DanielChief
    Level 10 (207,926 points)
    Applications
    Jul 1, 2016 8:34 AM in response to DanielChief

    If Spotlight works for everything except the files on the NAS, that's a compatibility issue. I have no experience with those devices, and going by what I've read on this site, I wouldn't use one. All I can suggest is that you use SMB instead of AFP as the file-sharing protocol. AFP support in a third-party device is bound to be very weak.

  • by DanielChief,

    DanielChief DanielChief Jul 4, 2016 6:59 AM in response to Linc Davis
    Level 1 (4 points)
    Mac OS X
    Jul 4, 2016 6:59 AM in response to Linc Davis

    Thanks. Yeah, it looks like a compatibility problem. We just tested it with Mavericks, and searching is working like it supposed to be. Should be a problem with El Capitan's Spotlight or the AFP protocol itself?

  • by John Lockwood,

    John Lockwood John Lockwood Jul 4, 2016 9:24 AM in response to DanielChief
    Level 6 (9,230 points)
    Servers Enterprise
    Jul 4, 2016 9:24 AM in response to DanielChief

    There are two types of searching, file name based searching and Spotlight meta-data based searching.

     

    If you are searching a local volume or a volume shared by an Apple Mac acting as a File Server then both methods should work since the Mac will index files for searching via Spotlight and also be able to do the basic file name searching. However a NAS server like your Synology is not a Mac, it therefore runs not Apple's software but an open-source program called Netatalk. More recent versions of Netatalk do include a feature allowing them to index the files for use with Spotlight but not all NAS devices have a new enough version and even those that do may not have enabled this feature.

     

    I believe Synology devices running DSM 6.0 or later can do Spotlight indexing, so in theory you are covered. This is likely to only work via an AFP connection, while you say you have enabled AFP access you need to make sure your El Capitan running Macs are actually connecting via AFP. This is because depending on how you connect to a server El Capitan will normally pick SMB rather than AFP to connect with.

     

    Rather than clicking on the name of the Synology server in the lefthand sidebar of a Mac Finder window, or via the Browse Network window, instead you must use the 'Connect to Server' dialog box and type in afp://address.of.server

     

    By including the afp:// at the beginning of the address you tell OS X to only use AFP.

     

    In theory if Spotlight is not available the Mac should revert to a simple filename only based search which obviously should find files if their names exist. If file and folder permissions prevent you accessing some files or folders then they should not be listed. If the Mac is using Spotlight but Spotlight is returning incomplete results then either - in this case on the Synology the indexing process has not finished, or the indexing process also does not have permission to access some files/folders or the spotlight index is corrupt. If the later you need to somehow force it to redo the indexing from scratch. (This is sometimes necessary on a genuine Mac server let alone one that is not a real Mac.)