Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tloubrieu-jpl opened this issue Oct 7, 2024 · 0 comments

Comments

@tloubrieu-jpl
Copy link
Member

💡 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ToDo
Development

No branches or pull requests

1 participant