-
-
Notifications
You must be signed in to change notification settings - Fork 756
fix postcard compatibility for top_hits, add postcard test #2346
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
Conversation
@@ -92,8 +96,9 @@ pub struct TopHitsVecEntry { | |||
|
|||
/// Search results, for queries that include field retrieval requests | |||
/// (`docvalue_fields`). | |||
#[serde(flatten)] | |||
pub search_results: FieldRetrivalResult, |
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.
this should have been FieldRetrievalResult
too.
Is it still used? Can we remove or rename it?
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.
It can't be FieldRetrievalResult
, since postcard does not support flatten
src/aggregation/metric/top_hits.rs
Outdated
@@ -344,7 +366,7 @@ impl PartialEq for ComparableDocFeature { | |||
impl Eq for ComparableDocFeature {} | |||
|
|||
#[derive(Clone, Serialize, Deserialize, Debug)] | |||
struct ComparableDocFeatures(Vec<ComparableDocFeature>, FieldRetrivalResult); | |||
struct ComparableDocFeatures(Vec<ComparableDocFeature>, IntermediateFieldRetrivalResult); |
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.
Can we fix the terrible struct name and remove the 2 positional arguments and use a regular struct?
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.
Yes, I did also do a pass on all the names and some comments
38df0c0
to
00752da
Compare
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.
ComparableDocFeatures
fixes quickwit-oss/quickwit#4840
Fix intermediate result postcard serialization by removing flatten
Fix intermediate result postcard deserialization by replacing
OwnedValue
(no self-describing formats)Delay doc value fetchting to end of segment collection, closes #2347
Fix naming and struct organization