Skip to content

Commit

Permalink
Add special handling for InvestigationInstrument filters #18
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-austin committed Oct 6, 2023
1 parent c9f2154 commit b6d3e60
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/org/icatproject/lucene/SearchBucket.java
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,9 @@ private void buildFilterQueries(String target, JsonObject requestedQuery, Builde
if (filterTarget.equals("sample") && !target.equals("investigation")) {
nestedQuery = JoinUtil.createJoinQuery("sample.id", false, "sample.id", Long.class,
dimensionQuery, nestedSearcher, ScoreMode.None);
} else if (filterTarget.toLowerCase().equals("investigationinstrument") && !target.equals("investigation")) {
nestedQuery = JoinUtil.createJoinQuery("investigation.id", false, "investigation.id", Long.class, dimensionQuery,
nestedSearcher, ScoreMode.None);
} else {
nestedQuery = JoinUtil.createJoinQuery(target + ".id", false, "id", Long.class, dimensionQuery,
nestedSearcher, ScoreMode.None);
Expand Down

0 comments on commit b6d3e60

Please sign in to comment.