The sad fact is that most people believe that they are under some kind of obligation to acquiesce when an officer contacts them and asks permission to search them or their belongings.
The truth is the exact opposite: You have a right to associate with and speak to whomever you please. In this respect, there is nothing special about a police officer. Assuming you would not let a complete stranger look through your purse or search your pockets, why would you allow a police officer to do so? -- Especially if you're not doing anything illegal!!! Just say "NO" to unwarranted searches!