

def __new__(cls):
    'Guess the correct search backend and initialize it.'
    if (connection.vendor == 'postgresql'):
        version = get_postgresql_version(connection)
        if (version > 80400):
            return PostgresSearchBackend()
        if (version > 80300):
            return PostgresLegacySearchBackend()
    if (connection.vendor == 'mysql'):
        return MySQLSearchBackend()
    return RegexSearchBackend()

dataset/ETHPy150Open etianen/django-watson/src/watson/backends.py AdaptiveSearchBackend.__new__/original