-
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
As a user, I want the PDS4 properties to be case agnositics #354
Comments
There is a utility function (model.SearchUtil) that converts . to _ hide the elasticsearch specialness of . -- I do not know if opensearch has the same specialness but given its roots probably. Another utility function does the reverse hiding (mostly) the . and _ translations from the end user. These functions do not change the case of what is being searched. Part of the reason why is that if we lower cased everything from the user, then the db would have to all be lower case too (opensearch is not case agnostic when it comes to field names). If they were all set to lower case in opensearch, then the user would get them returned as lower case. As I remember that was an undesirable consequence. If you had a table of correct casing for each all lower case field names, it could be undone. However who and how are you maintaining that table? You also have to fix the problem of coexisting field names such as Document and document. All that said, if it is possible to make opensearch case agnostic to field name case via a global configuration, then that should be done. When searching, case sensitivity of the value can be set but not the field name. Another option would be to use an edit estimate to get it to select a near field given the edit distance - another way to correct case on the fly -- but it will also change 'cace' to 'case' which may not be desirable or have unwelcome consequences like a successful return when the user was expecting an error. |
Thanks @al-niessner , I believe this worked before. I don't know when and how we lost this feature, maybe when we switched to opensearch... Certainly we did not have to maintain a table to match case sensible properties with lower case properties, and I think I would rather give up that requirement than doing that. |
It might also be that harvest was loading the fields in lower case and stop doing that at some point. Or I just dreamed but the reason I am thinking it used to work is that the notebook I was testing the API with, worked 1 or 2 years ago, then worked again recently except for the case of the properties in the |
Not hallucinating (proof you are not an AI bot). We did make changes for a short time to have the fields be case agnostic but changed back because of the problem of returning wrong case to user in JSON response because all lower case in elasticsearch at the time. I think we did just with the test data at the time. It was short lived. #154 was part of it, |
May have been changes in how we defined the fields. As text they are case insensitive. Keywords are case sensitive. See: |
Thanks @al-niessner for pointing that ticket #154 out. I will close this ticket as wontfix, and open 2 other tickets:
|
Checked for duplicates
Yes - I've already checked
π§βπ¬ User Persona(s)
API user
πͺ Motivation
...so that I can handle the case anyhow and avoid having silent errors when the case is not right.
π Additional Details
Actually this is a bug in the current API version where the case is turn to lower case mostly but the q= critiria need to have the exact PDS4 . notation case. I believe it used to work but I don't remember how.
Acceptance Criteria
Given
When I perform
Then I expect
βοΈ Engineering Details
No response
The text was updated successfully, but these errors were encountered: