diff --git a/rest/src/main/groovy/whelk/rest/api/SearchUtils2.java b/rest/src/main/groovy/whelk/rest/api/SearchUtils2.java index 6bf3941cae..7235404090 100644 --- a/rest/src/main/groovy/whelk/rest/api/SearchUtils2.java +++ b/rest/src/main/groovy/whelk/rest/api/SearchUtils2.java @@ -68,7 +68,7 @@ Map doSearch(Map queryParameters) throws Inval Map partialCollectionView = getPartialCollectionView(queryRes, qTree, queryParams, appParams); - if (!queryParams.debug.contains(QueryParams.Debug.ES_QUERY)) { + if (queryParams.debug.contains(QueryParams.Debug.ES_QUERY)) { partialCollectionView.put(QueryParams.ApiParams.DEBUG, Map.of(QueryParams.Debug.ES_QUERY, esQueryDsl)); }