Skip to content

Commit 110d13a

Browse files
authored
Merge pull request #1611 from woowacourse/1522-es-search
refactor: ES dateTime 타입 및 쿼리 필터 수정
2 parents d0ec8fc + 1cc9fce commit 110d13a

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

backend/src/main/java/wooteco/prolog/studylog/domain/StudylogDocument.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ public class StudylogDocument {
4141
@Field(type = FieldType.Text)
4242
private String username;
4343

44-
@Field(type = FieldType.Text)
44+
@Field(type = FieldType.Date, format = DateFormat.date_optional_time)
4545
private LocalDateTime dateTime;
4646
}

backend/src/main/java/wooteco/prolog/studylog/domain/StudylogDocumentQueryBuilder.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ private static void makeBoolQuery(
6666
.must(defaultField(username, "username"))
6767
// .must(defaultField(levels, "levelId"))
6868
// .must(defaultField(missions, "missionId"))
69-
.filter(rangeQuery(start, end))
69+
// .filter(rangeQuery(start, end))
7070
);
7171
}
7272

@@ -96,7 +96,6 @@ private static RangeQueryBuilder rangeQuery(LocalDate start, LocalDate end) {
9696
if (Objects.isNull(end)) {
9797
end = LocalDate.parse("99991231", DateTimeFormatter.BASIC_ISO_DATE);
9898
}
99-
10099
return QueryBuilders.rangeQuery("dateTime")
101100
.from(start)
102101
.to(end);

0 commit comments

Comments
 (0)