From 49c067c1c47eb610a4458a93c2a8aa1fedd8f8ae Mon Sep 17 00:00:00 2001 From: Helen Lin Date: Fri, 7 Nov 2025 17:46:17 -0800 Subject: [PATCH] docs: list indexed fields --- docs/source/ExamplesDocDBRestApi.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/source/ExamplesDocDBRestApi.rst b/docs/source/ExamplesDocDBRestApi.rst index d2dad10..5f32c47 100644 --- a/docs/source/ExamplesDocDBRestApi.rst +++ b/docs/source/ExamplesDocDBRestApi.rst @@ -8,6 +8,20 @@ REST API using the provided Python client. Querying Metadata ~~~~~~~~~~~~~~~~~~~~~~ +.. note:: + + There are a several indexed fields in the DocDB metadata collection to support + efficient query execution by limiting the number of documents to be scanned. + Please use these fields in your filter queries whenever possible. + + Currently, the following fields are indexed in the v1 (``metadata_index/data_assets``) + collection: ``_id``, ``name``, ``location``, ``subject.subject_id``, + ``data_description.project_name``, and ``data_description.modality.abbreviation``. + + The same fields are indexed in the v2 (``metadata_index_v2/data_assets``) collection, + other than spelling for the modality field (``data_description.modalities.abbreviation``). + + Count Example 1: Get # of records with a certain subject_id -----------------------------------------------------------