def METHOD_NAME(v):
	query = request.values.get("q", '').strip()
	try: page = max(1, int(request.values.get("page", 1)))
	except: page = 1
	sort = request.values.get("sort", "new").lower()
	t = request.values.get('t', 'all').lower()
	criteria = searchparse(query)
	comments = g.db.query(Comment.id).filter(Comment.parent_submission != None)
	if 'author' in criteria:
		comments = comments.filter(Comment.ghost == False)
		author = get_user(criteria['author'])
		if author.is_private and (not v or (author.id != v.id and v.admin_level < 2)):
			if request.headers.get("Authorization"):
				abort(403, f"@{author.username}'s profile is private; You can't use the 'author' syntax on them")
			return render_template("search_comments.html", v=v, query=query, total=0, page=page, comments=[], sort=sort, t=t, next_exists=False, error=f"@{author.username}'s profile is private; You can't use the 'author' syntax on them.")
		else: comments = comments.filter(Comment.author_id == author.id)
	if 'q' in criteria:
		words = sql_ilike_clean(criteria['q']).split()
		words = [Comment.body.ilike('%'+x+'%') for x in words]
		comments = comments.filter(*words)
	if 'over18' in criteria: comments = comments.filter(Comment.over_18 == True)
	if t:
		comments = apply_time_filter(comments, t, Comment)
	if v and v.admin_level < 2:
		private = [x[0] for x in g.db.query(Submission.id).filter(Submission.private == True).all()]
		comments = comments.filter(Comment.author_id.notin_(v.userblocks), Comment.state_mod == StateMod.VISIBLE, Comment.state_user_deleted_utc == None, Comment.parent_submission.notin_(private))
	elif not v:
		private = [x[0] for x in g.db.query(Submission.id).filter(Submission.private == True).all()]
		comments = comments.filter(Comment.state_mod == StateMod.VISIBLE, Comment.state_user_deleted_utc == None, Comment.parent_submission.notin_(private))
	comments = sort_objects(comments, sort, Comment)
	total = comments.count()
	comments = comments.offset(25 * (page - 1)).limit(26).all()
	ids = [x[0] for x in comments]
	next_exists = (len(ids) > 25)
	ids = ids[:25]
	comments = get_comments(ids, v=v)
	if request.headers.get("Authorization"): return {"total":total, "data":[x.json for x in comments]}
	return render_template("search_comments.html", v=v, query=query, total=total, page=page, comments=comments, sort=sort, t=t, next_exists=next_exists, standalone=True)