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

Add keywords to files during creation #4625

Merged

Conversation

shinyhappydan
Copy link
Contributor

@shinyhappydan shinyhappydan commented Jan 5, 2024

Fixes #4512

  • Check full text search works
  • Name, description fields
  • Parsing metadata should return an error
  • Metadata fields should be moved?

@@ -182,6 +182,9 @@
}
}
},
"_keywords": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keywords.
Also:

  • You will need a multi-field here to enable full text search properly
  • Flattened could be an option here, we have to be careful that when searching, the ES query does not fail because a keyword value does not exist but return an empty value

@shinyhappydan shinyhappydan force-pushed the file-custom-metadata-create branch 8 times, most recently from 0f1e085 to 3566dc0 Compare January 5, 2024 14:22
@shinyhappydan shinyhappydan changed the title File metadata Add custom metadata to files during creation Jan 8, 2024
implicit val userMetadataCodec: Codec.AsObject[FileUserMetadata] =
deriveConfiguredCodec[FileUserMetadata]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this should be treated as a leaf node and not have configured codecs? Since it really is just a Map[String, String] wrapper rather than a KG thing (which I assume the custom circe config is intended for)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sentence wasn't clear at all - just meant we don't want to accidentally map certain custom keys / values based on config like transformMemberNames

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think with the tests we will know it's not accidentally mapped? I probably have in mind too much that there are other fields coming soon to this class. I'm not sure what a better version of this would look like

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, if we're testing mapped fields as the metadata fields. Just a regular Codec would work I think, without the configured part e.g. deriveCodec

@shinyhappydan shinyhappydan force-pushed the file-custom-metadata-create branch 2 times, most recently from 0500cf0 to c987e9a Compare January 17, 2024 07:32
@shinyhappydan shinyhappydan force-pushed the file-custom-metadata-create branch 4 times, most recently from 68c63d3 to 4a2dae7 Compare January 24, 2024 13:35
@shinyhappydan shinyhappydan merged commit d684dd3 into BlueBrain:master Feb 1, 2024
7 checks passed
@shinyhappydan shinyhappydan deleted the file-custom-metadata-create branch February 1, 2024 11:09
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 this pull request may close these issues.

Add the ability to add custom metadata to files during creation
3 participants