Dealing with search queries such as "Portland, OR"

Use text queries in this case, they are simpler then a query_string, but won't fail in this case.

On Wednesday, June 15, 2011 at 5:34 PM, Adam Creeger wrote:

Hey all,

Does anyone have any advice on how to deal with search queries such as "Portland, OR"? When doing a query string based search, the parsing fails (see the error message at Error when using searching for Portland, OR · GitHub).

I could use a regex such as \bOR\W*$ and replace it with a lowercase "or", but that seems kind of clunky and I'm sure that regex will miss some cases.

Has anyone solved this kind of issue before, or have better solutions?

Thanks as always,

Adam