potatolondon/search — pull request #19 by pyriku (2013-05-09 09:53:47+00:00)
Title: Simple text search

AppEngine's Search API supports [math operators](https://developers.google.com/appengine/docs/python/search/overview), allowing things like `_rank - _score < 10`. That could cause some problems in portals where we just want text search, because searchs like `yes - no` will raise an error:

File "lib/search/query.py", line 121, in _results_iter
self._run_query()
File "lib/search/query.py", line 217, in _run_query
options=search_options
File "/python27_runtime/python27_lib/versions/1/google/appengine/api/search/search.py", line 2253, in __init__
_CheckQuery(self._query_string)
File "/python27_runtime/python27_lib/versions/1/google/appengine/api/search/search.py", line 1931, in _CheckQuery
raise QueryError('Failed to parse query "%s"' % query)
QueryError: Failed to parse query "yes - no"

This pull requests allows the user to subclass `SearchQuery` and use it for doing the search through an `Index`.