Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: ES dateTime 타입 및 쿼리 필터 수정 #1611

Merged
merged 1 commit into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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))
);
}

Expand Down Expand Up @@ -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);
Expand Down
Loading