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

Sellective metadata set #277

Closed
JTvD opened this issue Oct 23, 2024 · 1 comment · Fixed by #281
Closed

Sellective metadata set #277

JTvD opened this issue Oct 23, 2024 · 1 comment · Fixed by #281

Comments

@JTvD
Copy link
Collaborator

JTvD commented Oct 23, 2024

Adding and querying metadata leads to a small challenge. After the experiment we would like to be able to find all experiments containing a specific crop, for example 'tomato'.
To do this we add the crops as metadata fields. This works well.

Unfortunately, it did not take long before experiments focused on the interaction between two crops and from there the number grew.
There are multiple ways to go about this. But we notice they all have their own downsides:

  1. key: CROP, value: tomato, lettuce
  2. key: CROP, value tomato. key: CROP, value lettuce.

If the first case is used we always have to add wildcards in queries before/after the crop: %tomato%,
This lowers the readability of the metadata and makes the queries a bit more complicated.
Case 2 works fine, until we do a metadata 'set'. Than it replaces all the 'CROP' keys with one new one...

From a readability and ease of use we like case 2, which also seems more intuitive in the ibridge-gui. Hovering over the update button does warn it replaces all keys with the name name. But as the user clicked on a specific key I would expect only that key would be updated...

I am would like to know what you think/advise?

@chStaiger
Copy link
Collaborator

Thank you very much for the issue. I was actually thinking for quite some time if we should have a simple MetaData.update function. This would take a metadata item and update the value and units part but only for the selected metadata item, not all which start with the same key.
I will add the update function to the metadata module and after a new release replace the SET button in the GUI with an UPDATE button.
The metadata.set() will continue to exist in the API.

We will keep your bullet point 1 in mind and will keep track of all the use cases where users would like to use lists as values in the metadata. The lgoic for the search then becomes very complex, since items in the list can potentially connected with or, and and not. So we will have to see whether we can find some useful generalisation.

@chStaiger chStaiger linked a pull request Oct 24, 2024 that will close this issue
@qubixes qubixes mentioned this issue Nov 8, 2024
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

Successfully merging a pull request may close this issue.

2 participants