Disable Sort for Summary Count (#4728)
* disable sort for summary count * disable sort logic for count only
This commit is contained in:
Родитель
449af6a8d3
Коммит
6712d827ec
|
@ -411,7 +411,9 @@ namespace Microsoft.Health.Fhir.Core.Features.Search
|
|||
searchOptions.UnsupportedSearchParams = unsupportedSearchParameters;
|
||||
|
||||
var searchSortErrors = new List<string>();
|
||||
if (searchParams.Sort?.Count > 0)
|
||||
|
||||
// Sort is unneded for summary count
|
||||
if (searchParams.Sort?.Count > 0 && searchParams.Summary != SummaryType.Count)
|
||||
{
|
||||
var sortings = new List<(SearchParameterInfo, SortOrder)>(searchParams.Sort.Count);
|
||||
bool sortingsValid = true;
|
||||
|
|
|
@ -158,7 +158,7 @@ namespace Microsoft.Health.Fhir.SqlServer.Features.Search
|
|||
// We seem to have run a sort which has returned less results than what max we can return.
|
||||
// Let's determine whether we need to execute another query or not.
|
||||
if ((sqlSearchOptions.Sort[0].sortOrder == SortOrder.Ascending && sqlSearchOptions.DidWeSearchForSortValue.HasValue && !sqlSearchOptions.DidWeSearchForSortValue.Value) ||
|
||||
(sqlSearchOptions.Sort[0].sortOrder == SortOrder.Descending && sqlSearchOptions.DidWeSearchForSortValue.HasValue && sqlSearchOptions.DidWeSearchForSortValue.Value && !sqlSearchOptions.SortHasMissingModifier) || (sqlSearchOptions.Sort[0].sortOrder == SortOrder.Descending && resultCount == 0))
|
||||
(sqlSearchOptions.Sort[0].sortOrder == SortOrder.Descending && sqlSearchOptions.DidWeSearchForSortValue.HasValue && sqlSearchOptions.DidWeSearchForSortValue.Value && !sqlSearchOptions.SortHasMissingModifier) || (sqlSearchOptions.Sort[0].sortOrder == SortOrder.Descending && resultCount == 0 && !sqlSearchOptions.CountOnly))
|
||||
{
|
||||
if (sqlSearchOptions.MaxItemCount - resultCount == 0)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче