searchExperiments can apply some of the ExperimentSearchFields to the SharingClient.searchEntities call, by mapping them to SearchCriteria.
For example, ExpeirmentSearchField.PROJECT_ID can be mapped to EntitySearchField.PARENT_ENTITY_ID.
Other fields that can be mapped:
- USER_NAME (experiment owner)
Motivation: in SEAGrid Desktop client we found that the list of experiments in a project is often incomplete. The desktop client calls API method searchExperiments; searchExperiments first calls the sharing catalog to get all of the experiment ids that are accessible to the authenticating user. This list of ids is limited to 1000, which is an easy limit to reach when the user is a member of the Admins group and hence has access to all of the experiments in the gateway. searchExperiments then passes this list of experiment ids to the registry which returns the experiments that belong to this list AND are in the given project. Hence, it happens that returned experiments are not all of those in the project.