

def filter_queryset(self, request, queryset, view):
    '\n        This performs a full-text search on the result set\n        Eg: ?search=James Joyce\n        '
    search_enabled = getattr(settings, 'WAGTAILAPI_SEARCH_ENABLED', True)
    if ('search' in request.GET):
        if (not search_enabled):
            raise BadRequestError('search is disabled')
        if getattr(view, '_filtered_by_tag', False):
            raise BadRequestError('filtering by tag with a search query is not supported')
        search_query = request.GET['search']
        sb = get_search_backend()
        queryset = sb.search(search_query, queryset)
    return queryset

dataset/ETHPy150Open torchbox/wagtail/wagtail/contrib/wagtailapi/filters.py SearchFilter.filter_queryset/VarMisuse@58/124 `queryset`->`view`