Escaped boolean queries with wildcards

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Escaped boolean queries with wildcards

riotpolice
In order to support autocomplete in a location search, I'm taking the query string and adding a wildcard to the end. This works fine in general, but I'm having trouble with searches like "Portland, OR". In this case, the OR is treated as a boolean operator, and the search fails. Downcasing the query fixed this problem, but it still fails to return any results if I add my wildcard to the end of the search. The resulting search is:

'portland, or*'

'portland, or' and 'new york, ny*' work correctly, so I assume the problem is still with the presence of the OR. Any ideas what I can do to make this search return the expected result?

AH