From b1599909d14f3326d0fbdacff233a9b20802b38c Mon Sep 17 00:00:00 2001 From: PARKJONGGYEONG Date: Mon, 13 May 2024 14:20:56 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20#30=20java=20Docs=20=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/t3t/frontserver/elastic/client/ElasticClient.java | 7 +++++++ .../elastic/controller/AutocompleteController.java | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/t3t/frontserver/elastic/client/ElasticClient.java b/src/main/java/com/t3t/frontserver/elastic/client/ElasticClient.java index 80f9812..9a0dd9d 100644 --- a/src/main/java/com/t3t/frontserver/elastic/client/ElasticClient.java +++ b/src/main/java/com/t3t/frontserver/elastic/client/ElasticClient.java @@ -48,6 +48,13 @@ public interface ElasticClient { @RequestParam int pageNo, @PathVariable(value = "categoryId",required = false) BigDecimal categoryId, @RequestParam(value = "sortBy", defaultValue = "_score", required = false) String sortBy); + /** + * + * elasticsearch 기반 실시간 자동완성 + * + * @param prefix text 검색어 + * @return 서버의 데이터를 가지고 옴 + */ @GetMapping("/t3t/bookstore/autocomplete") ResponseEntity>> autocomplete(@RequestParam String prefix); } diff --git a/src/main/java/com/t3t/frontserver/elastic/controller/AutocompleteController.java b/src/main/java/com/t3t/frontserver/elastic/controller/AutocompleteController.java index 9d1948e..51258a7 100644 --- a/src/main/java/com/t3t/frontserver/elastic/controller/AutocompleteController.java +++ b/src/main/java/com/t3t/frontserver/elastic/controller/AutocompleteController.java @@ -14,7 +14,13 @@ @RequiredArgsConstructor public class AutocompleteController { private final ElasticClient elasticAdaptor; - + /** + * + * elasticsearch 기반 실시간 자동완성 + * + * @param prefix text 검색어 + * @return 페이지로 정보를 가지고 이동 + */ @GetMapping("/autocomplete") public ResponseEntity>> proxyAutocomplete(@RequestParam String prefix) {