diff --git a/src/main/java/org/icatproject/lucene/SearchBucket.java b/src/main/java/org/icatproject/lucene/SearchBucket.java index aca88fa..31d12a3 100644 --- a/src/main/java/org/icatproject/lucene/SearchBucket.java +++ b/src/main/java/org/icatproject/lucene/SearchBucket.java @@ -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);