# HG changeset patch # User Sebastien Jodogne # Date 1734446913 -3600 # Node ID 327618bac696882b3be15fb523078cebdd252b01 # Parent 73d5b77e5d62d214ea794151efab3abd580faeda comment diff -r 73d5b77e5d62 -r 327618bac696 OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp --- a/OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp Tue Dec 17 15:40:48 2024 +0100 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp Tue Dec 17 15:48:33 2024 +0100 @@ -3284,8 +3284,15 @@ if (requestType == FindType_Count && caseSensitive) { + /** + * Explanation: "/tools/find" uses "lookup_->IsMatch(tags)" in "ResourceFinder::Execute()" + * to apply case sensitiveness (as the database stores tags with PN VR in lower case). + * But, the purpose of "/tools/count-resources" is to speed up the counting the number of + * matching resources: Calling "lookup_->IsMatch(tags)" would require gathering the main + * DICOM tags, which would lead to no speedup wrt. "/tools/find". + **/ throw OrthancException(ErrorCode_ParameterOutOfRange, "Setting \"" + std::string(KEY_CASE_SENSITIVE) + - "\" to \"true\" is not supported by /tools/count-resources"); + "\" to \"true\" is not supported by /tools/count-resources"); } }