-
Notifications
You must be signed in to change notification settings - Fork 5
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
bundle of a product does not return result #150
Comments
This ticket shows the same behavior as NASA-PDS/pds-api#133 which was close because it was not reproduced. The bug is not visible in the stable release deployed in production so this ticket is not critical but need to be understood. |
@al-niessner found out it is an effect of the migration from elasticsearch to opensearch. |
Invite your opensearch specialists to identify the problem. Let me set the stage first: There are two opensearch queries -- bypasses registry for simple clarity: q1 (query 1):
and q2 (query 2):
and if I difference the two queries to focus on the characters that are different rather than the entire JSON:
Everything is the same but the name of the term and its value. If I then directly use a test opensearch:
It seems term can no longer find a value in an array list.. We can see from q2 that the value does exist in the term given in q1. Running q2 it gives us the expected results:
Combined the correct q2 with q1 to make this request:
Given the bundle can be found but that the value cannot be found in ref_lid_collection implies it should return nothing, which is what happens:
So, I need help understanding what opensearch is doing oe think it is doing to make the queries work correctly and thus fix the registry. Maybe just need help seeing the wrong character. Wanted to make sure that terms was required instead of term so created q4:
but it too returns nothing:
|
hypothesis: ref_lid_collection does not show up in localhost:9200/registry Try to add it and then see if test passes. |
Verified hypothesis. This going to be a very long post but it is critical to understand the situation. There are two possible things that happened:
opensearch does not allow the mapping to be changed then reindeced without changing names of the index. If we used alias I could have used the test database created by harvest. Since we do not use aliases, created a test database myself. It is really simple but it will eat up a bit space. It is the creation and testing of it that allowed me to discover the bit about dynamic being crucial. The first thing I did was create a registry with a mapping using this data:
Use the command to initiate it:
Then add the data with:
Important: in the above command, that the ref is defined and not peter. Using a simple query test:
it fails to find the ref as shown:
Now, the same search works if
Therefore this ticket cannot be fixed until the registry is fixed. It also brings up another point, better to have references rather than |
See above comment about dynamic. |
@al-niessner so if I understanding this correctly, it sounds like we just need to change the OpenSearch config to have |
Yes and no. The default is dynamic=true. For some reason harvest or some harvesty process is setting it to false. I do not know why but it was a conscious decision by someone to make it false. Not a typo or forgot to set it true. So, yes, we can make it true again but that will come with consequences that someone thought better to avoid; so no. |
I would suggest making something like references and putting it in the mapping while leaving dynamic=false. Then I would put all references secondary, product, etc into references. You can keep the other but registry-api does not need them nor wants them. In any case, these are harvest changes. |
@al-niessner from the commit history here: https://github.com/NASA-PDS/registry-mgr/commits/main/src/main/resources/elastic/refs.json, it doesn't appear there is any particular reason mentioned for setting dynamic=false. but I also wouldn't say I am following all of this very intently. we may need to have a discussion with @tloubrieu-jpl and @jimmie to discuss options. preferably the option that requires the least amount of refactoring of the existing indices and software. |
@al-niessner just as a heads up, no idea how it worked before, but apparently in our Build 12.0 testing, this requirement was tested and satisfied with https://github.com/NASA-PDS/registry-api-service/releases/tag/v0.4.2 . not worth rehashing but somehow it worked 🤷 . definitely don't do anything different, was just trying to track down how this bug made it into the current release. |
fixed by NASA-PDS/registry-mgr#50 |
🐛 Describe the bug
bundle of a product does not return result
📜 To Reproduce
Steps to reproduce the behavior:
0. prepare a test server with reference test datasets
http://localhost:8081/uid/urn:nasa:pds:insight_rad:data_derived:hp3_rad_der_00014_20181211_073042::1.0/referencing/bundle
🕵️ Expected behavior
The request http://localhost:8081/uid/urn:nasa:pds:insight_rad:data_derived:hp3_rad_der_00014_20181211_073042::1.0/referencing/bundle should return the description of the bundle of the requested product
📚 Version of Software Used
1.1.0-SNAPSHOT
🩺 Test Data / Additional context
🏞Screenshots
🖥 System Info
🦄 Related requirements
🦄 #454
⚙️ Engineering Details
The text was updated successfully, but these errors were encountered: