diff --git a/crates/pile-dataset/src/index/index_fts.rs b/crates/pile-dataset/src/index/index_fts.rs index f40b8f8..0bf0369 100644 --- a/crates/pile-dataset/src/index/index_fts.rs +++ b/crates/pile-dataset/src/index/index_fts.rs @@ -112,8 +112,8 @@ impl DbFtsIndex { // Try paths in order, using the first value we find for path in field.path.as_slice() { let val = match extractor.query(state, path).await? { + Some(PileValue::Null) | None => continue, Some(x) => x, - None => continue, }; let val = val_to_string(state, &val, path, field_name).await?; diff --git a/crates/pile/src/command/item.rs b/crates/pile/src/command/item.rs index db1e3a2..5d40910 100644 --- a/crates/pile/src/command/item.rs +++ b/crates/pile/src/command/item.rs @@ -67,7 +67,9 @@ impl CliCmd for ItemCommand { .query(&state, path) .await .with_context(|| format!("while extracting field {name}"))?; - if let Some(v) = v { + if let Some(v) = v + && !matches!(v, PileValue::Null) + { let j = v .to_json(&state) .await