# HG changeset patch # User Sebastien Jodogne # Date 1720519610 -7200 # Node ID f0f7d15d195e2111c87274d99add727ed1c2e644 # Parent 9b3816c210086830aac9e6e9bf031aa3857416a6 using FindRequest in ServerContext::Apply() diff -r 9b3816c21008 -r f0f7d15d195e OrthancServer/Sources/ServerContext.cpp --- 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); }