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

ref_lid_* fields are not added to the Registry schema prior to load #127

Closed
jordanpadams opened this issue Aug 18, 2023 · 5 comments Β· Fixed by NASA-PDS/registry-common#47 Β· May be fixed by #152
Closed

ref_lid_* fields are not added to the Registry schema prior to load #127

jordanpadams opened this issue Aug 18, 2023 · 5 comments Β· Fixed by NASA-PDS/registry-common#47 Β· May be fixed by #152

Comments

@jordanpadams
Copy link
Member

Checked for duplicates

No - I haven't checked

πŸ› Describe the bug

When I loaded data with a ref_lid_* not already in the registry, the fields are not searchable.

πŸ•΅οΈ Expected behavior

I expected the fields to be searchable

πŸ“œ To Reproduce

This query for ref_lid_target works because we include that in our initial schema creation:

https://pds.nasa.gov/api/search/1/products?q=ref_lid_target%20eq%20%22urn:nasa:pds:context:target:planet.mercury%22

This query for ref_lid_associate does not (but should):
https://pds.nasa.gov/api/search/1/products?q=ref_lid_associate%20eq%20%22urn:nasa:pds:context:node:node.imaging%22

Same for ref_lid_data (and it should work):
https://pds.nasa.gov/api/search/1/products?q=ref_lid_data%20eq%20%22urn:nasa:pds:messenger_mdis_4001:bdr_rdr:mdis_bdr_256ppd_h07nw2%22

πŸ–₯ Environment Info

  • Chrome Browser

πŸ“š Version of Software Used

API v1.1, Harvest v3.7.6

🩺 Test Data / Additional context

No response

πŸ¦„ Related requirements

No response

βš™οΈ Engineering Details

No response

@tloubrieu-jpl
Copy link
Member

tloubrieu-jpl commented Apr 17, 2024

Harvest need to dymanically update the list of ref_lid_* fields which are searchable whenever they are found in the products.
That should make the end of this configuration file https://github.com/NASA-PDS/registry-mgr/blob/main/src/main/resources/elastic/registry.json#L59 obsolete

@al-niessner
Copy link
Contributor

@jordanpadams @tloubrieu-jpl

Just to be clear, we now want to scan every product for ref_lid_* and add them to the index when found? When we say product do we mean all products or product not to include bundles or collections?

@tloubrieu-jpl
Copy link
Member

Hi @al-niessner ,
We mean products as for any class of products including bundles and collections.
And yes, we want all the ref_lid_* found (created by harvest?) to be added to the schema before the product is loaded to opensearch.

@al-niessner
Copy link
Contributor

@tloubrieu-jpl

Did a find/grep of all java files in harvest and there is no creation of ref_lid done there. Turns out it is done in registry-common but very, very far away from any connection to a DB. So, the simplest thing is to push the check back into harvest where it knows its connection and do it there. Doing all products makes it much simpler. Thanks.

@tloubrieu-jpl
Copy link
Member

That sounds good, thanks @al-niessner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment