encode query when sending to auto_index
Merge pull request #168 from raduk/master

encode query when sending to auto_index