# HG changeset patch # User Sebastien Jodogne # Date 1431515809 -7200 # Node ID 28563d910039a2fe57f55d6df4b61535aa7c5fa4 # Parent 3dd494f201a146f500eff6f81c3d6488da18cf39 cont diff -r 3dd494f201a1 -r 28563d910039 OrthancServer/ResourceFinder.cpp --- a/OrthancServer/ResourceFinder.cpp Wed May 13 12:17:35 2015 +0200 +++ b/OrthancServer/ResourceFinder.cpp Wed May 13 13:16:49 2015 +0200 @@ -286,7 +286,8 @@ ResourceFinder::ResourceFinder(ServerIndex& index) : index_(index), level_(ResourceType_Patient), - caseSensitive_(true) + caseSensitive_(true), + nonMainTagsIgnored_(false) { } @@ -361,7 +362,8 @@ ApplyAtLevel(candidates, ResourceType_Instance); } - if (!query_.empty()) + if (!nonMainTagsIgnored_ && + !query_.empty()) { LOG(ERROR) << "Invalid query: Searching against a tag that is not valid for the requested level"; throw OrthancException(ErrorCode_BadRequest); diff -r 3dd494f201a1 -r 28563d910039 OrthancServer/ResourceFinder.h --- a/OrthancServer/ResourceFinder.h Wed May 13 12:17:35 2015 +0200 +++ b/OrthancServer/ResourceFinder.h Wed May 13 13:16:49 2015 +0200 @@ -48,6 +48,7 @@ ServerIndex& index_; ResourceType level_; bool caseSensitive_; + bool nonMainTagsIgnored_; Query query_; static void ExtractTagsForLevel(Query& result, @@ -70,6 +71,16 @@ caseSensitive_ = sensitive; } + bool NonMainTagsIgnored() const + { + return nonMainTagsIgnored_; + } + + void SetNonMainTagsIgnored(bool ignored) + { + nonMainTagsIgnored_ = ignored; + } + ResourceType GetLevel() const { return level_;