First, note that objects from type “AnalysisRequest” are stored in a catalog other than “bika_setup_catalog”. You can check the catalogs a given portal type is stored by using the “catalogs” resource: Catalog resource at senaite.jsonapi documentation
If you use the catalogs resource, you’ll see that the main catalog where objects from type “AnalysisRequest” are stored is called “bika_catalog_analysisrequest_listing”. Again, if you inspect the indexes (for searching and sorting) of this catalog, you’ll find there is no index available for
ClientOrderNumber. There are other indexes available though, like
getClientSampleID. Therefore, you cannot do direct searches by “ClientOrderNumber”. However, if there is no choice and you need to do searches against this field, you can either
a) add an index (with name
getClientOrderNumber and type
FieldIndex) through ZMI to this catalog or
b) create a new catalog with your own indexes and metadata columns.
Remember that on both cases you’ll need to force the reindex the index via ZMI afterwards. If you follow the strategy (a), you will then be able to retrieve all the objects with a request like follows:
Also, please note “complete=true” forces the system to wake-up the objects found. Better to use “complete=true” when strictly necessary only.