Item types and Blob values
This commit is contained in:
@@ -144,6 +144,8 @@ impl DbFtsIndex {
|
||||
|
||||
loop {
|
||||
val = match val {
|
||||
PileValue::String(x) => return Ok(Some(x.to_string())),
|
||||
|
||||
#[expect(clippy::unwrap_used)]
|
||||
PileValue::Array(ref mut x) => {
|
||||
if x.len() == 1 {
|
||||
@@ -161,30 +163,37 @@ impl DbFtsIndex {
|
||||
message = "Skipping field, is empty array",
|
||||
field = field_name.to_string(),
|
||||
?path,
|
||||
//value = ?val
|
||||
);
|
||||
continue 'outer;
|
||||
}
|
||||
}
|
||||
|
||||
PileValue::Null => {
|
||||
trace!(
|
||||
message = "Skipping field, is null",
|
||||
field = field_name.to_string(),
|
||||
?path,
|
||||
//value = ?val
|
||||
);
|
||||
continue 'outer;
|
||||
}
|
||||
|
||||
PileValue::Extractor(_) => {
|
||||
trace!(
|
||||
message = "Skipping field, is object",
|
||||
field = field_name.to_string(),
|
||||
?path,
|
||||
//value = ?val
|
||||
);
|
||||
continue 'outer;
|
||||
}
|
||||
PileValue::String(x) => return Ok(Some(x.to_string())),
|
||||
|
||||
PileValue::Blob { .. } => {
|
||||
trace!(
|
||||
message = "Skipping field, is blob",
|
||||
field = field_name.to_string(),
|
||||
?path,
|
||||
);
|
||||
continue 'outer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -291,6 +300,7 @@ pub fn apply<'a>(post: &FieldSpecPost, val: &PileValue<'a>) -> Option<PileValue<
|
||||
|
||||
FieldSpecPost::SetCase { case: Case::Lower } => match val {
|
||||
PileValue::Null => return None,
|
||||
PileValue::Blob { .. } => return None,
|
||||
PileValue::Extractor(_) => return None,
|
||||
PileValue::String(x) => PileValue::String(x.to_lowercase().into()),
|
||||
|
||||
@@ -301,6 +311,7 @@ pub fn apply<'a>(post: &FieldSpecPost, val: &PileValue<'a>) -> Option<PileValue<
|
||||
|
||||
FieldSpecPost::SetCase { case: Case::Upper } => match val {
|
||||
PileValue::Null => return None,
|
||||
PileValue::Blob { .. } => return None,
|
||||
PileValue::Extractor(_) => return None,
|
||||
PileValue::String(x) => PileValue::String(x.to_uppercase().into()),
|
||||
|
||||
@@ -311,6 +322,7 @@ pub fn apply<'a>(post: &FieldSpecPost, val: &PileValue<'a>) -> Option<PileValue<
|
||||
|
||||
FieldSpecPost::TrimSuffix { trim_suffix } => match val {
|
||||
PileValue::Null => return None,
|
||||
PileValue::Blob { .. } => return None,
|
||||
PileValue::Extractor(_) => return None,
|
||||
|
||||
PileValue::String(x) => {
|
||||
@@ -324,6 +336,7 @@ pub fn apply<'a>(post: &FieldSpecPost, val: &PileValue<'a>) -> Option<PileValue<
|
||||
|
||||
FieldSpecPost::TrimPrefix { trim_prefix } => match val {
|
||||
PileValue::Null => return None,
|
||||
PileValue::Blob { .. } => return None,
|
||||
PileValue::Extractor(_) => return None,
|
||||
|
||||
PileValue::String(x) => {
|
||||
@@ -337,6 +350,7 @@ pub fn apply<'a>(post: &FieldSpecPost, val: &PileValue<'a>) -> Option<PileValue<
|
||||
|
||||
FieldSpecPost::Join { join } => match val {
|
||||
PileValue::Null => return None,
|
||||
PileValue::Blob { .. } => return None,
|
||||
PileValue::Extractor(_) => return None,
|
||||
|
||||
PileValue::String(x) => PileValue::String(x.clone()),
|
||||
|
||||
Reference in New Issue
Block a user