Skip to content

Commit

Permalink
#287: Improve filters
Browse files Browse the repository at this point in the history
  • Loading branch information
ja-fra committed Jul 15, 2024
1 parent b7ee571 commit 2d04e51
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,28 +129,28 @@ static List<Query> getFilters(Long studyId, Integer observationId, Integer study
static Query getStudyFilter(Long studyId) {
return Query.of(f -> f.
term(t -> t.
field("study_id").
field("study_id.keyword").
value(getStudyIdString(studyId))));
}

static Query getObservationFilter(Integer observationId) {
return Query.of(f -> f.
term(t -> t.
field("observation_id").
field("observation_id.keyword").
value(observationId)));
}

static Query getStudyGroupFilter(Integer studyGroupId) {
return Query.of(f -> f.
term(t -> t.
field("study_group_id").
field("study_group_id.keyword").
value(getStudyGroupIdString(studyGroupId))));
}

static Query getParticipantFilter(Integer participantId) {
return Query.of(f -> f.
term(t -> t.
field("participant_id").
field("participant_id.keyword").
value(getParticipantIdString(participantId))));
}

Expand Down

0 comments on commit 2d04e51

Please sign in to comment.