From 156e2b40429fdc44a872d794595d4d9743fac06e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Sa=CC=88rkikoski?= Date: Fri, 5 Apr 2024 10:08:00 +0300 Subject: [PATCH] Modify sort criteria --- .../ElasticSearchQueryGenerators/FundingCallQueryGenerator.cs | 2 +- .../InfrastructureQueryGenerator.cs | 3 +-- .../ElasticSearchQueryGenerators/OrganizationQueryGenerator.cs | 3 +-- .../ResearchDatasetQueryGenerator.cs | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/aspnetcore/src/ElasticService/ElasticSearchQueryGenerators/FundingCallQueryGenerator.cs b/aspnetcore/src/ElasticService/ElasticSearchQueryGenerators/FundingCallQueryGenerator.cs index 9d5bea1..d60392a 100644 --- a/aspnetcore/src/ElasticService/ElasticSearchQueryGenerators/FundingCallQueryGenerator.cs +++ b/aspnetcore/src/ElasticService/ElasticSearchQueryGenerators/FundingCallQueryGenerator.cs @@ -136,6 +136,6 @@ protected override Func, IPromise>> Gen { // Sort funding calls return sortDescriptor => sortDescriptor - .Field(f => f.CallProgrammeOpenDate, SortOrder.Descending); + .Field(f => f.CallProgrammeDueDate, SortOrder.Ascending); } } \ No newline at end of file diff --git a/aspnetcore/src/ElasticService/ElasticSearchQueryGenerators/InfrastructureQueryGenerator.cs b/aspnetcore/src/ElasticService/ElasticSearchQueryGenerators/InfrastructureQueryGenerator.cs index f93c904..595ce12 100644 --- a/aspnetcore/src/ElasticService/ElasticSearchQueryGenerators/InfrastructureQueryGenerator.cs +++ b/aspnetcore/src/ElasticService/ElasticSearchQueryGenerators/InfrastructureQueryGenerator.cs @@ -42,7 +42,6 @@ protected override Func, QueryContainer protected override Func, IPromise>> GenerateSortForSearch(InfrastructureSearchParameters parameters) { // Sort infrastructures - return sortDescriptor => sortDescriptor - .Field(f => f.NameFi, SortOrder.Ascending); + return sortDescriptor => sortDescriptor; } } \ No newline at end of file diff --git a/aspnetcore/src/ElasticService/ElasticSearchQueryGenerators/OrganizationQueryGenerator.cs b/aspnetcore/src/ElasticService/ElasticSearchQueryGenerators/OrganizationQueryGenerator.cs index 3085eb3..e81c741 100644 --- a/aspnetcore/src/ElasticService/ElasticSearchQueryGenerators/OrganizationQueryGenerator.cs +++ b/aspnetcore/src/ElasticService/ElasticSearchQueryGenerators/OrganizationQueryGenerator.cs @@ -42,7 +42,6 @@ protected override Func, QueryContainer> protected override Func, IPromise>> GenerateSortForSearch(OrganizationSearchParameters parameters) { // Sort organizations - return sortDescriptor => sortDescriptor - .Field(f => f.NameFi, SortOrder.Ascending); + return sortDescriptor => sortDescriptor; } } \ No newline at end of file diff --git a/aspnetcore/src/ElasticService/ElasticSearchQueryGenerators/ResearchDatasetQueryGenerator.cs b/aspnetcore/src/ElasticService/ElasticSearchQueryGenerators/ResearchDatasetQueryGenerator.cs index 4a7c357..1329002 100644 --- a/aspnetcore/src/ElasticService/ElasticSearchQueryGenerators/ResearchDatasetQueryGenerator.cs +++ b/aspnetcore/src/ElasticService/ElasticSearchQueryGenerators/ResearchDatasetQueryGenerator.cs @@ -207,6 +207,6 @@ protected override Func, IPromise>> { // Sort research datasets return sortDescriptor => sortDescriptor - .Field(f => f.NameFi, SortOrder.Ascending); + .Field(f => f.Created, SortOrder.Descending); } } \ No newline at end of file