If you use quick search in share it does search filename by default. But lucene may think that "mydocumentname.doc" is one word, so in order to find by filename you have to use mydocumentname* to find it.
You can also try name:mydocumentname* to search explicitly in file name or name:*pdf will find just pdf files.