changeset 5940:327618bac696

comment
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 17 Dec 2024 15:48:33 +0100
parents 73d5b77e5d62
children 51c7db6fc109 92495eeca461
files OrthancServer/Sources/OrthancRestApi/OrthancRestResources.cpp
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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");
           }
         }