From 263abb094c8822da81231a0c44bbee126906a2a5 Mon Sep 17 00:00:00 2001 From: Mirko Zizzari Date: Tue, 3 Sep 2024 17:45:36 +0200 Subject: [PATCH] issue #1077: sf --- .../searcher/resource/SearchResource.java | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/core/app/searcher/src/main/java/io/openk9/searcher/resource/SearchResource.java b/core/app/searcher/src/main/java/io/openk9/searcher/resource/SearchResource.java index f402d5c58..632e8545f 100644 --- a/core/app/searcher/src/main/java/io/openk9/searcher/resource/SearchResource.java +++ b/core/app/searcher/src/main/java/io/openk9/searcher/resource/SearchResource.java @@ -110,8 +110,6 @@ public Uni searchQuery(SearchRequest searchRequest) { } - private static final Logger logger = Logger.getLogger(SearchResource.class); - @POST @Path("/suggestions") @Produces(MediaType.APPLICATION_JSON) @@ -125,12 +123,6 @@ public Uni suggestions(SearchRequest searchRequest) { .map(internalSearcherMapper::toSuggestionsResponse); } - @Inject - SearcherMapper searcherMapper; - @Inject - InternalSearcherMapper internalSearcherMapper; - @Inject - RestHighLevelClient restHighLevelClient; @POST @Path("/search") @@ -556,13 +548,6 @@ private Resp parseEntity( } } - @GrpcClient("searcher") - Searcher searcherClient; - - @Inject - @Claim(standard = Claims.raw_token) - String rawToken; - private Response toSearchResponse(SearchResponse searchResponse) { printShardFailures(searchResponse); @@ -625,6 +610,20 @@ private Response toSearchResponse(SearchResponse searchResponse) { return new Response(result, totalHits.value); } + private static final Logger logger = Logger.getLogger(SearchResource.class); + @GrpcClient("searcher") + Searcher searcherClient; + + @Inject + @Claim(standard = Claims.raw_token) + String rawToken; + @Inject + SearcherMapper searcherMapper; + @Inject + InternalSearcherMapper internalSearcherMapper; + @Inject + RestHighLevelClient restHighLevelClient; + @Context HttpServerRequest request; @@ -648,4 +647,5 @@ private void printShardFailures(SearchResponse searchResponse) { } } } + }