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

String value representation for scientific metadata properties #1287

Open
Duanoc opened this issue Jun 27, 2024 · 0 comments
Open

String value representation for scientific metadata properties #1287

Duanoc opened this issue Jun 27, 2024 · 0 comments

Comments

@Duanoc
Copy link

Duanoc commented Jun 27, 2024

Issue Name

String value representation for scientific metadata properties

Summary

The string search for properties within within Scientific Metadata does not work as expected.

Steps to Reproduce

Try to search for a property string if it is import within a json as

    "wiki_page": {
      "value": "FWKP:047 0p7THz LSCO 2mmZnTe 50K-001"
    },

and as

   "wiki_page": "FWKP:20 DAQ CdAs 120degs WP 40degs SHG V polar 01",

Current Behaviour

To search for a dataset with a given property my search:

        query_fields={
            "scientific":[
                {
                    "lhs": "wiki_page",
                    "relation": "EQUAL_TO_STRING",
                    "rhs": pagename
                }
            ]
        }

returns no result if the property is import as

   "wiki_page": "FWKP:20 DAQ CdAs 120degs WP 40degs SHG V polar 01",

I get a result if the imported json looks like:

    "wiki_page": {
      "value": "FWKP:047 0p7THz LSCO 2mmZnTe 50K-001"
    },

Expected Behaviour

Result of the matching datasets if the property is stored directly and not under value. It should work with

   "wiki_page": "FWKP:20 DAQ CdAs 120degs WP 40degs SHG V polar 01",

Extra Details

I don't if it was correct to open a new issue. Since it seems this issue is not new (2022). I see similarities to #138 and #119. Forcing the string to be places within the value key means to change the json schema. This would mean that "property": str schema definition is useless for scicat.

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

No branches or pull requests

1 participant