Mercurial > hg > orthanc
changeset 5685:f0f7d15d195e find-refactoring
using FindRequest in ServerContext::Apply()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 09 Jul 2024 12:06:50 +0200 |
parents | 9b3816c21008 |
children | 11575590e493 |
files | OrthancServer/Sources/ServerContext.cpp |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancServer/Sources/ServerContext.cpp Tue Jul 09 11:39:07 2024 +0200 +++ b/OrthancServer/Sources/ServerContext.cpp Tue Jul 09 12:06:50 2024 +0200 @@ -1557,16 +1557,19 @@ fastLookup->RemoveConstraint(DICOM_TAG_MODALITIES_IN_STUDY); } - const size_t lookupLimit = (databaseLimit == 0 ? 0 : databaseLimit + 1); - - if (false) + if (true) { /** * EXPERIMENTAL VERSION **/ ResourceFinder finder(queryLevel, false /* TODO-FIND: don't expand for now */); - finder.SetLimits(0, lookupLimit); + + if (databaseLimit != 0) + { + finder.SetLimits(0, databaseLimit + 1); + } + finder.SetDatabaseLookup(*fastLookup); finder.SetLabels(labels); finder.SetLabelsConstraint(labelsConstraint); @@ -1603,6 +1606,7 @@ * VERSION IN ORTHANC <= 1.12.4 **/ + const size_t lookupLimit = (databaseLimit == 0 ? 0 : databaseLimit + 1); GetIndex().ApplyLookupResources(resources, &instances, *fastLookup, queryLevel, labels, labelsConstraint, lookupLimit); }