dcrec1 / acts_as_solr_reloaded

ActsAsSolr with new features
http://www.diegocarrion.com
MIT License
102 stars 30 forks source link

Search string doesn't gets sanitized #6

Closed mauricioszabo closed 12 years ago

mauricioszabo commented 14 years ago

Model.search doesn't sanitize string. If I try any search with quotes (Model.search 'Me"') or starting with wildcards ("*" or "?"), it raises an error.

dcrec1 commented 14 years ago

Hi Mauricio, Solr doesn't support queries starting with * or ?.

About the quotes, I will look this, thanks for the feedback.

mauricioszabo commented 14 years ago

I know it doesn't support, so I thing it should return an empty resultset... otherwise, I would need to catch every "search" on my controller, as every search could raise an exception. Don't know if there is a better way, throught.

jumph4x commented 13 years ago

Additionally, parenthesis cause issues. A special sanitize method is needed.

dcrec1 commented 13 years ago

Ok, will try to implement this. A pull request would be great, too :)

jumph4x commented 12 years ago

We can close this now :)