Fix KeywordSection::load not deserializing correctly
This commit is contained in:
parent
91b587f7db
commit
435b05949e
@ -5,7 +5,8 @@ use serde::{Deserialize, Serialize};
|
|||||||
#[derive(Debug, Clone, Deserialize, Serialize)]
|
#[derive(Debug, Clone, Deserialize, Serialize)]
|
||||||
pub struct KeywordSection {
|
pub struct KeywordSection {
|
||||||
pub threshold: u64,
|
pub threshold: u64,
|
||||||
pub requiredKeywords: Vec<String>,
|
#[serde(rename = "requiredKeywords")]
|
||||||
|
pub required: Vec<String>,
|
||||||
pub keywords: Vec<String>,
|
pub keywords: Vec<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,7 +28,7 @@ impl KeywordSection {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for rkw in self.requiredKeywords.to_owned() {
|
for rkw in self.required.to_owned() {
|
||||||
if s.contains(&rkw) {
|
if s.contains(&rkw) {
|
||||||
hits += 1;
|
hits += 1;
|
||||||
hit_required = true;
|
hit_required = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user