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);