From 380988a38997b6c6c524014f4c22a2400e6393b2 Mon Sep 17 00:00:00 2001 From: Quinten Van Assche Date: Mon, 11 Dec 2023 11:10:42 +0100 Subject: [PATCH] feat: add default sorting on VCode for beheer zoeken --- .../Search/SearchVerenigingenController.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/AssociationRegistry.Admin.Api/Verenigingen/Search/SearchVerenigingenController.cs b/src/AssociationRegistry.Admin.Api/Verenigingen/Search/SearchVerenigingenController.cs index 6488657c3..0f08a1f63 100644 --- a/src/AssociationRegistry.Admin.Api/Verenigingen/Search/SearchVerenigingenController.cs +++ b/src/AssociationRegistry.Admin.Api/Verenigingen/Search/SearchVerenigingenController.cs @@ -8,7 +8,6 @@ namespace AssociationRegistry.Admin.Api.Verenigingen.Search; using FluentValidation; using Infrastructure; using Infrastructure.Swagger.Annotations; -using Infrastructure.Swagger.Examples; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Nest; @@ -98,14 +97,15 @@ private static async Task> Search( s => s .From(paginationQueryParams.Offset) .Size(paginationQueryParams.Limit) + .Sort(x => x.Descending(v => v.VCode)) .Query( - query => query.Bool( - boolQueryDescriptor => boolQueryDescriptor.Must( - queryContainerDescriptor => queryContainerDescriptor.QueryString( - queryStringQueryDescriptor => queryStringQueryDescriptor.Query(q) - ) - ) - ) - ) + query => query.Bool( + boolQueryDescriptor => boolQueryDescriptor.Must( + queryContainerDescriptor => queryContainerDescriptor.QueryString( + queryStringQueryDescriptor => queryStringQueryDescriptor.Query(q) + ) + ) + ) + ) ); }