'.. http:get:: /search?q=(string:query)
A GET request to this endpoint will create a search. Results are returned over the events endpoint, one by one.
First, the results available in the local database will be pushed. After that, incoming Dispersy results are
pushed. The query to this endpoint is passed using the url, i.e. /search?q=pioneer.
**Example request**:
.. sourcecode:: none
curl -X GET http://localhost:8085/search?q=tribler
**Example response**:
.. sourcecode:: javascript
"type": "search_result_channel",
"query": "test",
"result": {
"id": 3,
"dispersy_cid": "da69aaad39ccf468aba2ab9177d5f8d8160135e6",
"name": "My fancy channel",
"description": "A description of this fancy channel",
"subscribed": True,
"votes": 23,
"torrents": 3,
"spam": 5,
"modified": 14598395,
"can_edit": False'

def render_GET(self, request):

    if ('q' not in request.args):
        request.setResponseCode(http.BAD_REQUEST)
        return json.dumps({'error': 'query    parameter    missing'})
    self.events_endpoint.start_new_query()
    query = unicode(request.args['q'][0], 'utf-8')
    keywords = split_into_keywords(query)
    results_local_channels = self.channel_db_handler.search_in_local_channels_db(query)
    results_dict = {'keywords': keywords, 'result_list': results_local_channels}
    self.session.notifier.notify(SIGNAL_CHANNEL, SIGNAL_ON_SEARCH_RESULTS, None, results_dict)
    torrent_db_columns = ['T.torrent_id', 'infohash', 'T.name', 'length', 'category', 'num_seeders', 'num_leechers', 'last_tracker_check']
    results_local_torrents = self.torrent_db_handler.search_in_local_torrents_db(query, keys=torrent_db_columns)
    results_dict = {'keywords': keywords, 'result_list': results_local_torrents}
    self.session.notifier.notify(SIGNAL_TORRENT, SIGNAL_ON_SEARCH_RESULTS, None, results_dict)
    try:
        self.session.search_remote_torrents(keywords)
        self.session.search_remote_channels(keywords)
    except OperationNotEnabledByConfigurationException as exc:
        self._logger.error(exc)
    return json.dumps({'queried': True})
