search: replace calls to PostQueryBuilder#fast_count with PostQuery#fast_count.

Prepare a few more places for the new tag search parser.
This commit is contained in:
evazion
2022-03-30 01:35:48 -05:00
parent 8c9e045a9c
commit 6edff247f2
5 changed files with 12 additions and 8 deletions

View File

@@ -6,7 +6,7 @@ class CountsController < ApplicationController
def posts
estimate_count = params.fetch(:estimate_count, "true").truthy?
skip_cache = params.fetch(:skip_cache, "false").truthy?
@count = PostQueryBuilder.new(params[:tags], CurrentUser.user, tag_limit: CurrentUser.user.tag_query_limit).normalized_query.fast_count(timeout: CurrentUser.statement_timeout, estimate_count: estimate_count, skip_cache: skip_cache)
@count = PostQuery.new(params[:tags], current_user: CurrentUser.user, tag_limit: CurrentUser.user.tag_query_limit).fast_count(timeout: CurrentUser.statement_timeout, estimate_count: estimate_count, skip_cache: skip_cache)
if request.format.xml?
respond_with({ posts: @count }, root: "counts")