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

the properties should be lower case or should match the PDS4 case #154

Open
tloubrieu-jpl opened this issue Jun 22, 2022 · 4 comments
Open
Labels

Comments

@tloubrieu-jpl
Copy link
Member

🐛 Describe the bug

The field request need to have the exact case. More a question that a bug for now, but we used to be able to use the lower case version of the property and the results were returned with all lower case property names.

For example:
'orex:Spatial.orex:latitude' vs 'orex:spatial.orex:latitude'

📜 To Reproduce

Steps to reproduce the behavior:

  1. Make request

    curl --location --request GET 'http://pds.nasa.gov/api/search-sbnpsi/1.0/collections/urn:nasa:pds:orex.ovirs:data_calibrated/products?fields=orex:Spatial.orex:latitude'

  2. Result is returned containing orex:Spatial.orex:latitude properties

  3. Make request:

    curl --location --request GET 'http://pds.nasa.gov/api/search-sbnpsi/1.0/collections/urn:nasa:pds:orex.ovirs:data_calibrated/products?fields=orex:spatial.orex:latitude'

(lower case S)

  1. The property orex:Spatial.orex:latitude is not returned

🕵️ Expected behavior

In previous versions of the API, the case was ignored.

I am not saying we need to come back to the old behavior but I am raising that as a change and we need to discuss what is required.

📚 Version of Software Used

1.0.0

🩺 Test Data / Additional context

🏞Screenshots

🖥 System Info

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

🦄 Related requirements

⚙️ Engineering Details

@tloubrieu-jpl tloubrieu-jpl added B13.0 bug Something isn't working needs:triage s.low Low level severity labels Jun 22, 2022
@jordanpadams
Copy link
Member

@tloubrieu-jpl I think we should try to handle search requests as being case agnostic, if possible, but we should return what is in the registry. My two cents anyways...

@al-niessner
Copy link
Contributor

@tloubrieu-jpl @jordanpadams

field names are case sensitive and have to match exactly (no transposition correction or case changing). If it was ever case insensitive then it changed with updates to elasticsearch and/or opensearch.

We could make it case insensitive by populating the db with all lower case field names. Obviously that is tricky if names are the same except for differing case. We could then just return the name given us. You will not like that if the person typed OREX:spAtiAl.orex:lAtitude, which would be allowable in case insensitivity, and then returned as typed.

So, do you really want case insensitivity or are you saying just sometimes like the example given? If the latter, then need to enumerate all the case insensitivity that is allowed.

Are you going to support closeness like oerx:Spatial.orex:latitude? I mean it is obviously a transposition typo.

I guess that if they are all unique when lower case, then can lower them all on every request, match, then use the version in the db. Not efficient but doable.

@jordanpadams
Copy link
Member

@al-niessner copy. In the future, we may want to do a basic translation from lower-case to title case, but for now, I think let's just march forward with what we have.

@jordanpadams
Copy link
Member

eventually we may need to support closeness for queries, but I think that is almost an entirely separate "did you mean?"-like capability that would require a separate search index for the search fields themselves.

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

No branches or pull requests

3 participants