From 1cc9fceb8af74ab73367614ddb094d1a637548a2 Mon Sep 17 00:00:00 2001 From: mcodnjs Date: Fri, 13 Oct 2023 16:07:31 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20ES=20dateTime=20=ED=83=80=EC=9E=85?= =?UTF-8?q?=20=EB=B0=8F=20=EC=BF=BC=EB=A6=AC=20=ED=95=84=ED=84=B0=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/wooteco/prolog/studylog/domain/StudylogDocument.java | 2 +- .../prolog/studylog/domain/StudylogDocumentQueryBuilder.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/wooteco/prolog/studylog/domain/StudylogDocument.java b/backend/src/main/java/wooteco/prolog/studylog/domain/StudylogDocument.java index 7a74c40c3..526d41ab3 100644 --- a/backend/src/main/java/wooteco/prolog/studylog/domain/StudylogDocument.java +++ b/backend/src/main/java/wooteco/prolog/studylog/domain/StudylogDocument.java @@ -41,6 +41,6 @@ public class StudylogDocument { @Field(type = FieldType.Text) private String username; - @Field(type = FieldType.Text) + @Field(type = FieldType.Date, format = DateFormat.date_optional_time) private LocalDateTime dateTime; } diff --git a/backend/src/main/java/wooteco/prolog/studylog/domain/StudylogDocumentQueryBuilder.java b/backend/src/main/java/wooteco/prolog/studylog/domain/StudylogDocumentQueryBuilder.java index 46d20d8d0..6358bcdff 100644 --- a/backend/src/main/java/wooteco/prolog/studylog/domain/StudylogDocumentQueryBuilder.java +++ b/backend/src/main/java/wooteco/prolog/studylog/domain/StudylogDocumentQueryBuilder.java @@ -66,7 +66,7 @@ private static void makeBoolQuery( .must(defaultField(username, "username")) // .must(defaultField(levels, "levelId")) // .must(defaultField(missions, "missionId")) - .filter(rangeQuery(start, end)) +// .filter(rangeQuery(start, end)) ); } @@ -96,7 +96,6 @@ private static RangeQueryBuilder rangeQuery(LocalDate start, LocalDate end) { if (Objects.isNull(end)) { end = LocalDate.parse("99991231", DateTimeFormatter.BASIC_ISO_DATE); } - return QueryBuilders.rangeQuery("dateTime") .from(start) .to(end);