Skip to content

Analyze and optimize the difference between direct OpenSearch queries vs registry API performances  #554

@tloubrieu-jpl

Description

@tloubrieu-jpl

💡 Description

For example opensearch query, in developer console on AWS:

GET /atm-registry,img-registry,geo-registry,psa-registry,ppi-registry,sbnumd-registry,sbnpsi-registry,rms-registry,naif-registry,en-registry/_search
{
  "query": {
   "bool": {
      "must": [
        {
          "match": {
            "product_class": "Product_Bundle"
          }
        },
        {
          "match": {
            "ops:Tracking_Meta/ops:archive_status": "archived"
          }
        }
      ]
    }
  },
  "fields": [
    "lidvid",
    "ops:Label_File_Info/ops:file_ref",
    "ops:Tracking_Meta/ops:archive_status"
  ],
  "_source": false
}

Result:

{
  "took": 48,
  "timed_out": false,
  "_shards": {
    "total": 0,
    "successful": 0,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 1935,
      "relation": "eq"
    },
    "max_score": 15.3165,
    "hits": [
      {
        "_index": "sbnumd-registry",
        "_id": "urn:nasa:pds:gbo-ctio::1.0",
        "_score": 15.3165,
        "fields": {
          "lidvid": [
            "urn:nasa:pds:gbo-ctio::1.0"
          ],
...

And API query:

% curl -kv -w '\n* Response time: %{time_total}s\n' 'https://pds.mcp.nasa.gov/api/search/1/classes/bundle?limit=1001&fields=lidvid,ops:Label_File_Info/ops:file_ref,ops:Tracking_Meta/ops:archive_status'
...
* Response time: 1.901252s

⚔️ Parent Epic / Related Tickets

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    ToDo

    Status

    Todo

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions