-
Notifications
You must be signed in to change notification settings - Fork 74
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
Add keywords to files during creation #4625
Conversation
delta/plugins/elasticsearch/src/main/resources/contexts/indexing-metadata.json
Outdated
Show resolved
Hide resolved
@@ -182,6 +182,9 @@ | |||
} | |||
} | |||
}, | |||
"_keywords": { |
There was a problem hiding this comment.
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
...src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/client/QueryBuilder.scala
Outdated
Show resolved
Hide resolved
...e/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/FormDataExtractor.scala
Outdated
Show resolved
Hide resolved
...e/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/FormDataExtractor.scala
Outdated
Show resolved
Hide resolved
...e/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/model/FileCommand.scala
Outdated
Show resolved
Hide resolved
0f1e085
to
3566dc0
Compare
3566dc0
to
d837d7c
Compare
.../scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/model/ResourcesSearchParams.scala
Outdated
Show resolved
Hide resolved
...e/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/FormDataExtractor.scala
Outdated
Show resolved
Hide resolved
tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/kg/files/FilesSpec.scala
Show resolved
Hide resolved
...scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/model/FileSerializationSuite.scala
Show resolved
Hide resolved
implicit val userMetadataCodec: Codec.AsObject[FileUserMetadata] = | ||
deriveConfiguredCodec[FileUserMetadata] |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
.../scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/model/ResourcesSearchParams.scala
Outdated
Show resolved
Hide resolved
e364895
to
dc58b06
Compare
...ge/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/batch/BatchFiles.scala
Outdated
Show resolved
Hide resolved
...age/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/model/FileState.scala
Outdated
Show resolved
Hide resolved
.../scala/ch/epfl/bluebrain/nexus/delta/plugins/elasticsearch/model/ResourcesSearchParams.scala
Outdated
Show resolved
Hide resolved
...c/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/batch/BatchFilesSuite.scala
Outdated
Show resolved
Hide resolved
tests/src/test/scala/ch/epfl/bluebrain/nexus/tests/kg/files/BatchCopySpec.scala
Outdated
Show resolved
Hide resolved
.../src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/storage/files/generators/FileGen.scala
Outdated
Show resolved
Hide resolved
0500cf0
to
c987e9a
Compare
68c63d3
to
4a2dae7
Compare
…used to search for files. This is useful because currently users need to encode this type of information in the filename.
…e new attributes field backwards compatible
77e9718
to
7ab0340
Compare
Fixes #4512