-
Notifications
You must be signed in to change notification settings - Fork 50
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
Fix relation metadata indexing in nidx + old index #2770
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2770 +/- ##
==========================================
- Coverage 86.83% 86.78% -0.05%
==========================================
Files 384 384
Lines 24308 24308
==========================================
- Hits 21107 21096 -11
- Misses 3201 3212 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -65,7 +65,7 @@ pub fn index_relations( | |||
|
|||
if let Some(metadata) = relation.metadata.as_ref() { | |||
let encoded_metadata = metadata.encode_to_vec(); | |||
new_doc.add_bytes(schema.label, encoded_metadata); | |||
new_doc.add_bytes(schema.metadata, encoded_metadata); |
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.
🤦
@@ -37,7 +37,7 @@ pub fn index_relations( | |||
let source = relation.source.as_ref().expect("Missing source"); | |||
let source_value = source.value.as_str(); | |||
let source_type = io_maps::node_type_to_u64(source.ntype()); | |||
let soruce_subtype = source.subtype.as_str(); | |||
let source_subtype = source.subtype.as_str(); |
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.
❤️
assert_eq!(metadata.source_end, Some(10)); | ||
assert_eq!(metadata.to_start, Some(11)); | ||
assert_eq!(metadata.to_end, Some(20)); | ||
assert_eq!(metadata.data_augmentation_task_id, Some("mytask".to_string())); |
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.
Nice to get a test as a bonus! 🙏
Description
Fixes small bug in nidx and old index that prevented relation metadata from being stored properly
How was this PR tested?