def METHOD_NAME(request):
    query_string = ''
    found_entries = []
    #filter by tags
    if ('tag' in request.GET) and request.GET['tag'].strip():
        query_string = request.GET['tag']
        found_entries = NewsArticle.objects.filter(tags__name__in=[query_string]).order_by('-date').distinct()
    #search by keyword
    if ('q' in request.GET) and request.GET['q'].strip():
        query_string = request.GET['q']
        vector = SearchVector('title', weight='A') + SearchVector('article_subjects__name', weight='C') + SearchVector('body', weight='B') + SearchVector('author', weight='B') + SearchVector('tags__name', weight='C')  + SearchVector('collections__name', weight='C')  + SearchVector('content_types__content_type', weight='C')
        query = get_query(query_string)
        found_entries = NewsArticle.objects.annotate(
            rank=SearchRank(vector, query),
            METHOD_NAME=vector,
        ).filter(rank__gte=0.3,live=True).order_by('-date', 'rank')
    if ('collection' in request.GET) and request.GET['collection'].strip():
        collection_name = request.GET['collection']
        types = []
        subjects = []
        if ('types' in request.GET) and request.GET['types'].strip():
            types = request.GET['types'].split(',')
        if ('subjects' in request.GET) and request.GET['subjects'].strip():
            subjects = request.GET['subjects'].split(',')
        found_entries = news_article_collection_search(collection_name, types, subjects)
    elif ('subjects' in request.GET) and request.GET['subjects'].strip():
        subject = request.GET['subjects']
        found_entries = news_article_subject_search(subject)
    search_results_json = []
    search_results_shown = set()
    for result in found_entries:
        if result.slug in search_results_shown:
            continue
        search_results_shown.add(result.slug)
        search_results_json.append({
            'id': result.id,
            'title': result.title,
            'subheading': result.subheading,
            'body_blurb': result.body_blurb,
            'article_image': result.article_image,
            'article_image_alt': result.featured_image_alt_text,
            'date': result.date,
            'author': result.author,
            'pin_to_top': result.pin_to_top,
            'tags': list(result.tags.names()),
            'collections': result.blog_collections,
            'article_subjects': result.blog_subjects,
            'content_types': result.blog_content_types,
            'slug': result.slug,
            'seo_title': result.seo_title,
            'search_description': result.search_description,
        })
    return JsonResponse(search_results_json, safe=False)