Fix for broken search domain resolution in OS X Yosemite | Computero
Very recently my Yosemite 10.10.4 machine stopped being able to resolve short hostnames for local systems on my personal network when using ping or ssh, but working fine for dig and nslookup. There are countless threads about discoveryd being the culprit, and indeed it is. Unloading and loading it wasn't helping. I finally found the above link, and quite frankly it doesn't make any good sense why it should work, but it did fix my problem. My local DNS is running a dnsmasq, answering both pre-defined hostnames and forwarding the remainder to my ISP's DNS servers, so the 'search' entry in /etc/resolv.conf is automatically being populated with my ISP's xyz.rr.com. This has never been an issue before, and honestly I don't think even should be attempted unless the short name lookup fails, but whatever.
Annoyed but happy I fixed it.