I noticed that Orthanc allows you to have a dictionary of private tags. Are these tags indexed? In other words, if I make a DICOMWeb query for a private tag, will it search the database? Or will it search the filesystem?
Also, I’m trying to get a feel for how expensive it is to search the filesystem for tags that aren’t indexed. Let’s say I’m storing the files on S3. If I make a query for a non indexed tag, will it need to download every file from S3 and search through every field?
Thank you for considering my question!
Hello,
The Orthanc Book briefly mentions this on https://book.orthanc-server.com/faq/orthanc-storage.html :
Besides the attachments, the database index maintains other information for each DICOM resource, notably the metadata, the history of changes, and an associative map that stores the so-called “main” DICOM tags (to avoid accessing the storage folder are when this is not needed). The SQLite database schema is kept as simple as possible, and can be found in the following two files of the source code of Orthanc: PrepareDatabase.sql and InstallTrackAttachmentsSize.sql.
The list of so-called “Main” tags can be found in the source code : OrthancFramework/Sources/DicomFormat/DicomMap.cpp
Thus, in my understanding, no, the private tags will not be indexed and will hit the database.
HTH,
Private tags are not indexed.
As explained in my yesterday’s answer, if doing a search on a non-indexed tag, Orthanc will evidently need to access the storage area (i.e. read from the filesystem if no storage area plugin is installed, or download file from Internet if you use S3) to obtain the value of this tag:
https://groups.google.com/g/orthanc-users/c/0VvppRkzGXw/m/1xTGHbCWBgAJ
It is thus highly advised to do queries that include indexed tags in order to limit the number of possible candidates. Orthanc will first filter the indexed tags. The non-indexed tags will only be read for the remaining candidates.