def _imageSearch(self, params):
        limit = params['limit'] if 'limit' in params else '100'
        query = params['query'] if 'query' in params else '*:*'
        offset = params['offset'] if 'offset' in params else '0'
        classifications = json.loads(params['classifications']) if 'classifications' in params else []
        base = os.environ['IMAGE_SPACE_SOLR'] + '/select'

        if classifications:
            query += ' AND (%s)' % ' OR '.join(['%s:[.7 TO *]' % key
                                                for key in classifications])

        qparams = {
            'wt': 'json',
            'hl': 'true',
            'hl.fl': '*',
            'q': query,
            'start': offset,
            'rows': limit
        }

        # Give plugins a chance to adjust the Solr query parameters
        event = events.trigger('imagespace.imagesearch.qparams', qparams)
        for response in event.responses:
            qparams = response

        try:
            result = requests.get(base, params=qparams, verify=False).json()
        except __HOLE__:
            return []

        for image in result['response']['docs']:
            image['highlight'] = result['highlighting'][image['id']]

        response = {
            'numFound': result['response']['numFound'],
            'docs': result['response']['docs']
        }

        # Give plugins a chance to adjust the end response of the imagesearch
        event = events.trigger('imagespace.imagesearch.results', response)
        for eventResponse in event.responses:
            response = eventResponse

        return response
dataset/ETHPy150Open memex-explorer/image_space/imagespace/server/imagesearch_rest.py/ImageSearch._imageSearch